From a852db2c8e7540fa76ffbecfd43984af572966d3 Mon Sep 17 00:00:00 2001
From: t-burch <119930761+t-burch@users.noreply.github.com>
Date: Tue, 12 Nov 2024 11:36:17 +0100
Subject: [PATCH] Add copyright notice and update target URLs in tests (#1337)
- Insert copyright notice for 2024 and Apache License at the top of relevant files.
- Change HTTP target URLs to HTTPS for better security in test configurations.
- Ensure consistency across interceptor packages by applying the same updates where necessary.
---
.../interceptor/json/ReplaceInterceptor.java | 13 +++++++++++++
.../shadowing/ShadowingInterceptor.java | 13 +++++++++++++
.../templating/StaticInterceptor.java | 13 +++++++++++++
.../session/StaticUserDataProviderTest.java | 13 +++++++++++++
.../interceptor/json/ReplaceInterceptorTest.java | 13 +++++++++++++
.../shadowing/ShadowingInterceptorTest.java | 13 +++++++++++++
.../templating/StaticInterceptorTest.java | 16 ++++++++++++----
.../examples/basic-xml-interceptor/pom.xml | 2 +-
distribution/examples/custom-interceptor/pom.xml | 2 +-
.../examples/soap/add-soap-header/pom.xml | 2 +-
distribution/examples/xslt/README.md | 4 +++-
distribution/examples/xslt/proxies.xml | 6 ++++--
.../tests/ConditionalInterceptorTest.java | 13 +++++++++++++
.../tests/ssl/SSLServerApiWithTlsPemTest.java | 13 +++++++++++++
.../tutorials/rest/TutorialRestStepsTest.java | 4 ++--
.../rest/rest-tutorial-steps-proxies.xml | 6 +++---
16 files changed, 131 insertions(+), 15 deletions(-)
diff --git a/core/src/main/java/com/predic8/membrane/core/interceptor/json/ReplaceInterceptor.java b/core/src/main/java/com/predic8/membrane/core/interceptor/json/ReplaceInterceptor.java
index ccfd400e88..5f89524001 100644
--- a/core/src/main/java/com/predic8/membrane/core/interceptor/json/ReplaceInterceptor.java
+++ b/core/src/main/java/com/predic8/membrane/core/interceptor/json/ReplaceInterceptor.java
@@ -1,3 +1,16 @@
+/* Copyright 2024 predic8 GmbH, www.predic8.com
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. */
package com.predic8.membrane.core.interceptor.json;
import com.jayway.jsonpath.Configuration;
diff --git a/core/src/main/java/com/predic8/membrane/core/interceptor/shadowing/ShadowingInterceptor.java b/core/src/main/java/com/predic8/membrane/core/interceptor/shadowing/ShadowingInterceptor.java
index 2e1b413cc0..18abe429cb 100644
--- a/core/src/main/java/com/predic8/membrane/core/interceptor/shadowing/ShadowingInterceptor.java
+++ b/core/src/main/java/com/predic8/membrane/core/interceptor/shadowing/ShadowingInterceptor.java
@@ -1,3 +1,16 @@
+/* Copyright 2024 predic8 GmbH, www.predic8.com
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. */
package com.predic8.membrane.core.interceptor.shadowing;
import com.predic8.membrane.annot.MCChildElement;
diff --git a/core/src/main/java/com/predic8/membrane/core/interceptor/templating/StaticInterceptor.java b/core/src/main/java/com/predic8/membrane/core/interceptor/templating/StaticInterceptor.java
index e35102ff38..d479fd8f36 100644
--- a/core/src/main/java/com/predic8/membrane/core/interceptor/templating/StaticInterceptor.java
+++ b/core/src/main/java/com/predic8/membrane/core/interceptor/templating/StaticInterceptor.java
@@ -1,3 +1,16 @@
+/* Copyright 2024 predic8 GmbH, www.predic8.com
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. */
package com.predic8.membrane.core.interceptor.templating;
import com.predic8.membrane.annot.MCAttribute;
diff --git a/core/src/test/java/com/predic8/membrane/core/interceptor/authentication/session/StaticUserDataProviderTest.java b/core/src/test/java/com/predic8/membrane/core/interceptor/authentication/session/StaticUserDataProviderTest.java
index 819c4456a3..fe46cac9cf 100644
--- a/core/src/test/java/com/predic8/membrane/core/interceptor/authentication/session/StaticUserDataProviderTest.java
+++ b/core/src/test/java/com/predic8/membrane/core/interceptor/authentication/session/StaticUserDataProviderTest.java
@@ -1,3 +1,16 @@
+/* Copyright 2024 predic8 GmbH, www.predic8.com
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. */
package com.predic8.membrane.core.interceptor.authentication.session;
import org.junit.jupiter.api.Assertions;
diff --git a/core/src/test/java/com/predic8/membrane/core/interceptor/json/ReplaceInterceptorTest.java b/core/src/test/java/com/predic8/membrane/core/interceptor/json/ReplaceInterceptorTest.java
index dfdbc591ca..9db4e36e03 100644
--- a/core/src/test/java/com/predic8/membrane/core/interceptor/json/ReplaceInterceptorTest.java
+++ b/core/src/test/java/com/predic8/membrane/core/interceptor/json/ReplaceInterceptorTest.java
@@ -1,3 +1,16 @@
+/* Copyright 2024 predic8 GmbH, www.predic8.com
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. */
package com.predic8.membrane.core.interceptor.json;
import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/core/src/test/java/com/predic8/membrane/core/interceptor/shadowing/ShadowingInterceptorTest.java b/core/src/test/java/com/predic8/membrane/core/interceptor/shadowing/ShadowingInterceptorTest.java
index 31d057c64c..58175db2c2 100644
--- a/core/src/test/java/com/predic8/membrane/core/interceptor/shadowing/ShadowingInterceptorTest.java
+++ b/core/src/test/java/com/predic8/membrane/core/interceptor/shadowing/ShadowingInterceptorTest.java
@@ -1,3 +1,16 @@
+/* Copyright 2024 predic8 GmbH, www.predic8.com
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. */
package com.predic8.membrane.core.interceptor.shadowing;
import com.predic8.membrane.core.Router;
diff --git a/core/src/test/java/com/predic8/membrane/core/interceptor/templating/StaticInterceptorTest.java b/core/src/test/java/com/predic8/membrane/core/interceptor/templating/StaticInterceptorTest.java
index 9edfbf074f..6afeaa988e 100644
--- a/core/src/test/java/com/predic8/membrane/core/interceptor/templating/StaticInterceptorTest.java
+++ b/core/src/test/java/com/predic8/membrane/core/interceptor/templating/StaticInterceptorTest.java
@@ -1,9 +1,17 @@
-package com.predic8.membrane.core.interceptor.templating;
+/* Copyright 2024 predic8 GmbH, www.predic8.com
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
-import org.junit.jupiter.api.Test;
+ http://www.apache.org/licenses/LICENSE-2.0
-import static com.predic8.membrane.core.interceptor.templating.StaticInterceptor.*;
-import static org.junit.jupiter.api.Assertions.assertEquals;
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. */
+package com.predic8.membrane.core.interceptor.templating;
class StaticInterceptorTest {
diff --git a/distribution/examples/basic-xml-interceptor/pom.xml b/distribution/examples/basic-xml-interceptor/pom.xml
index b44da6a32a..e3770dd1e1 100644
--- a/distribution/examples/basic-xml-interceptor/pom.xml
+++ b/distribution/examples/basic-xml-interceptor/pom.xml
@@ -21,7 +21,7 @@
org.membrane-soa
service-proxy-core
- 5.5.5-SNAPSHOT
+ 5.7.5-SNAPSHOT
diff --git a/distribution/examples/custom-interceptor/pom.xml b/distribution/examples/custom-interceptor/pom.xml
index c1f8fde1fb..82ebfe8da3 100644
--- a/distribution/examples/custom-interceptor/pom.xml
+++ b/distribution/examples/custom-interceptor/pom.xml
@@ -28,7 +28,7 @@
org.membrane-soa
service-proxy-core
- 5.5.5-SNAPSHOT
+ 5.7.5-SNAPSHOT
diff --git a/distribution/examples/soap/add-soap-header/pom.xml b/distribution/examples/soap/add-soap-header/pom.xml
index 0e61e8c766..841864286b 100644
--- a/distribution/examples/soap/add-soap-header/pom.xml
+++ b/distribution/examples/soap/add-soap-header/pom.xml
@@ -21,7 +21,7 @@
org.membrane-soa
service-proxy-core
- 5.5.5-SNAPSHOT
+ 5.7.5-SNAPSHOT
diff --git a/distribution/examples/xslt/README.md b/distribution/examples/xslt/README.md
index d28abee20a..1818faebe9 100644
--- a/distribution/examples/xslt/README.md
+++ b/distribution/examples/xslt/README.md
@@ -26,7 +26,9 @@ First take a look at the proxies.xml file.
-
+
+
+
```
diff --git a/distribution/examples/xslt/proxies.xml b/distribution/examples/xslt/proxies.xml
index 968ed8cac0..68e9d4850c 100644
--- a/distribution/examples/xslt/proxies.xml
+++ b/distribution/examples/xslt/proxies.xml
@@ -9,8 +9,10 @@
-
-
+
+
+
+
diff --git a/distribution/src/test/java/com/predic8/membrane/examples/tests/ConditionalInterceptorTest.java b/distribution/src/test/java/com/predic8/membrane/examples/tests/ConditionalInterceptorTest.java
index cdd05cc95a..5fb418f822 100644
--- a/distribution/src/test/java/com/predic8/membrane/examples/tests/ConditionalInterceptorTest.java
+++ b/distribution/src/test/java/com/predic8/membrane/examples/tests/ConditionalInterceptorTest.java
@@ -1,3 +1,16 @@
+/* Copyright 2024 predic8 GmbH, www.predic8.com
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. */
package com.predic8.membrane.examples.tests;
import com.predic8.membrane.examples.util.AbstractSampleMembraneStartStopTestcase;
diff --git a/distribution/src/test/java/com/predic8/membrane/examples/tests/ssl/SSLServerApiWithTlsPemTest.java b/distribution/src/test/java/com/predic8/membrane/examples/tests/ssl/SSLServerApiWithTlsPemTest.java
index d7ee98b8dd..64ef010a0a 100644
--- a/distribution/src/test/java/com/predic8/membrane/examples/tests/ssl/SSLServerApiWithTlsPemTest.java
+++ b/distribution/src/test/java/com/predic8/membrane/examples/tests/ssl/SSLServerApiWithTlsPemTest.java
@@ -1,3 +1,16 @@
+/* Copyright 2024 predic8 GmbH, www.predic8.com
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. */
package com.predic8.membrane.examples.tests.ssl;
import com.predic8.membrane.examples.util.DistributionExtractingTestcase;
diff --git a/distribution/src/test/java/com/predic8/membrane/examples/tutorials/rest/TutorialRestStepsTest.java b/distribution/src/test/java/com/predic8/membrane/examples/tutorials/rest/TutorialRestStepsTest.java
index 6b86c35b5d..91bae88082 100644
--- a/distribution/src/test/java/com/predic8/membrane/examples/tutorials/rest/TutorialRestStepsTest.java
+++ b/distribution/src/test/java/com/predic8/membrane/examples/tutorials/rest/TutorialRestStepsTest.java
@@ -61,7 +61,7 @@ public void start() throws Exception {
@Test
public void step1() {
- get("http://localhost:2001/shop/products/")
+ get("http://localhost:2001/shop/v2/products/")
.then()
.assertThat()
.contentType(APPLICATION_JSON)
@@ -76,7 +76,7 @@ public void step1() {
@Test
public void step2() {
- get("http://localhost:2001/shop/products/")
+ get("http://localhost:2001/shop/v2/products/")
.then()
.assertThat()
.contentType(APPLICATION_JSON)
diff --git a/distribution/src/test/resources/com/predic8/membrane/examples/tutorials/rest/rest-tutorial-steps-proxies.xml b/distribution/src/test/resources/com/predic8/membrane/examples/tutorials/rest/rest-tutorial-steps-proxies.xml
index dc4090414b..ae2cc1a38b 100644
--- a/distribution/src/test/resources/com/predic8/membrane/examples/tutorials/rest/rest-tutorial-steps-proxies.xml
+++ b/distribution/src/test/resources/com/predic8/membrane/examples/tutorials/rest/rest-tutorial-steps-proxies.xml
@@ -22,13 +22,13 @@
/restnames
-
+
/restnames
-
+
@@ -38,7 +38,7 @@
-
+