You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/12/21 20:32:43 UTC
(camel) branch main updated: CAMEL-20113: camel/tests consolidating (#12547)
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 0ad1f548b9c CAMEL-20113: camel/tests consolidating (#12547)
0ad1f548b9c is described below
commit 0ad1f548b9c6a46f4de323c707e402a7917e5b36
Author: Ivan Kulaga <ku...@gmail.com>
AuthorDate: Thu Dec 21 23:32:37 2023 +0300
CAMEL-20113: camel/tests consolidating (#12547)
* delete because org.apache.camel.component.jms.JmsDurableTopicTest does the same check
* module tests/camel-itest-jms2 contained only jms component tests. They are moved to jms component and tests/camel-itest-jms2 is deleted
* test from tests/camel-typeconverterscan was moved to processor tests. Processor converter tests were then moved to a separate package to avoid scanning the whole org.apache.camel.processor for custom converter. tests/camel-typeconverterscan was deleted as no relevant tests remained there.
* removed test as it is duplicated by org.apache.camel.management.CamelContextDisableJmxTest
* async tests are duplicated by org.apache.camel.impl.DefaultProducerTemplateAsyncTest; timeout tests are duplicated by org.apache.camel.component.jetty.async.JettyAsyncContinuationTimeoutTest
* FtpInitialConnectTimeoutTest is moved to ftp component tests
* CustomerServicesWsAddressingTest is deleted because wsdl with emplty soapAction is checked in org.apache.camel.component.cxf.CxfPayLoadSoapHeaderSpringTest
* CamelFileGreeterOneWayTest - is duplicated by org.apache.camel.component.cxf.AbstractCXFGreeterRouterTest.testInvokingServiceFromCXFClient()
* CamelGreeterConsumerTest - is duplicated by org.apache.camel.component.cxf.AbstractCXFGreeterRouterTest.testInvokingServiceFromCXFClient()
* CamelGreeterTest - is duplicated by org.apache.camel.component.cxf.jaxws.CxfProducerTest; MulticastCxfTest - moved to spring-cxf component
* RecipientListCxfTest and RecipientListCxf2Test are moved to spring-cxf component
* InterceptEndpointTest - interceptor is checked in other tests, so it is deleted; IdempotentConsumerTest - idempoten consumer is checked in other tests, so it is deleted
* AdviceWithWeaveFirstLastTest - is duplicated by org.apache.camel.processor.interceptor.AdviceWithWeaveFirstLastTest, so it is deleted
* IsUseAdviceWithJUnit5Test - is duplicated by AdviceWithNotStartedTest so it is deleted.
* JettyHttpFileCacheTest - moved to jetty component tests; JettyHttpTest - moved to jetty component tests
---
.../camel/component/cxf/CxfMulticastTest.java | 10 +-
.../camel/component/cxf/CxfRecipientListTest.java | 18 ++--
.../cxf/CxfRecipientListWithUrlParamsTest.java | 18 ++--
.../camel/component/cxf/CxfMulticastBeans.xml | 10 +-
.../camel/component/cxf/CxfRecipientListBeans.xml | 12 +--
.../cxf/CxfRecipientListWithUrlParamsBeans.xml | 16 ++--
.../jetty/JettyHttpHeadersCompatibilityTest.java | 4 +-
.../jetty/file}/JettyHttpFileCacheTest.java | 8 +-
.../camel/processor/converter/ConvertBodyTest.java | 4 +
.../processor/converter/ConvertHeaderTest.java | 4 +
.../itest/greeter/CamelFileGreeterOneWayTest.java | 63 -------------
.../itest/greeter/CamelGreeterConsumerTest.java | 69 --------------
.../camel/itest/greeter/CamelGreeterTest.java | 75 ---------------
.../camel/itest/greeter/FilePrepareRequest.java | 31 -------
.../camel/itest/greeter/JmsPrepareRequest.java | 31 -------
.../camel/itest/greeter/JmsPrepareResponse.java | 34 -------
.../org/apache/camel/itest/greeter/Server.java | 52 -----------
.../camel/itest/http/InterceptEndpointTest.java | 50 ----------
.../itest/idempotent/IdempotentConsumerTest.java | 45 ---------
.../itest/idempotent/JdbcIdempotentRepository.java | 75 ---------------
.../itest/issues/AdviceWithWeaveFirstLastTest.java | 101 ---------------------
...Test.java => InterceptFromAndStrategyTest.java} | 4 +-
.../itest/issues/IsUseAdviceWithJUnit5Test.java | 84 -----------------
.../itest/greeter/CamelFileGreeterOneWayTest.xml | 52 -----------
.../greeter/CamelGreeterConsumerTest-context.xml | 67 --------------
.../itest/greeter/CamelGreeterTest-context.xml | 65 -------------
.../itest/http/InterceptEndpointTest-context.xml | 46 ----------
.../itest/idempotent/IdempotentConsumerTest.xml | 47 ----------
28 files changed, 58 insertions(+), 1037 deletions(-)
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/MulticastCxfTest.java b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfMulticastTest.java
similarity index 92%
rename from tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/MulticastCxfTest.java
rename to components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfMulticastTest.java
index c287fb47aca..7153b12486e 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/MulticastCxfTest.java
+++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfMulticastTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.itest.greeter;
+package org.apache.camel.component.cxf;
import org.apache.camel.EndpointInject;
import org.apache.camel.component.cxf.common.message.CxfConstants;
@@ -27,12 +27,12 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
import static org.junit.jupiter.api.Assertions.assertEquals;
-public class MulticastCxfTest extends CamelSpringTestSupport {
+public class CxfMulticastTest extends CamelSpringTestSupport {
private static int port = AvailablePortFinder.getNextAvailable();
static {
//set them as system properties so Spring can use the property placeholder
//things to set them into the URL's in the spring contexts
- System.setProperty("MulticastCxfTest.port", Integer.toString(port));
+ System.setProperty("CxfMulticastTest.port", Integer.toString(port));
}
@EndpointInject("mock:reply")
@@ -46,11 +46,11 @@ public class MulticastCxfTest extends CamelSpringTestSupport {
@Override
protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/itest/greeter/MulticastCxfTest-context.xml");
+ return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/CxfMulticastBeans.xml");
}
@Test
- void testMulticastCXF() throws Exception {
+ void testCxfMulticast() throws Exception {
replyEndpoint.expectedBodiesReceived("Hello Willem", "Hello Claus", "Hello Jonathan");
reply2Endpoint.expectedBodiesReceived("Bye Willem", "Bye Claus", "Bye Jonathan");
outputEndpoint.expectedBodiesReceived("Bye Willem", "Bye Claus", "Bye Jonathan");
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/RecipientListCxfTest.java b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfRecipientListTest.java
similarity index 92%
rename from tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/RecipientListCxfTest.java
rename to components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfRecipientListTest.java
index 9c846217302..37e9aaa2e6e 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/RecipientListCxfTest.java
+++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfRecipientListTest.java
@@ -14,10 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.itest.greeter;
-
-import java.util.HashMap;
-import java.util.Map;
+package org.apache.camel.component.cxf;
import org.apache.camel.EndpointInject;
import org.apache.camel.component.cxf.common.message.CxfConstants;
@@ -28,17 +25,20 @@ import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
+import java.util.HashMap;
+import java.util.Map;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
-public class RecipientListCxfTest extends CamelSpringTestSupport {
+public class CxfRecipientListTest extends CamelSpringTestSupport {
private static int port1 = AvailablePortFinder.getNextAvailable();
private static int port2 = AvailablePortFinder.getNextAvailable();
static {
//set them as system properties so Spring can use the property placeholder
//things to set them into the URL's in the spring contexts
- System.setProperty("RecipientListCxfTest.port1", Integer.toString(port1));
- System.setProperty("RecipientListCxfTest.port2", Integer.toString(port2));
+ System.setProperty("CxfRecipientListTest.port1", Integer.toString(port1));
+ System.setProperty("CxfRecipientListTest.port2", Integer.toString(port2));
}
@EndpointInject("mock:reply")
@@ -52,11 +52,11 @@ public class RecipientListCxfTest extends CamelSpringTestSupport {
@Override
protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/itest/greeter/RecipientListCxfTest-context.xml");
+ return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/CxfRecipientListBeans.xml");
}
@Test
- void testRecipientListCXF() throws Exception {
+ void testCxfRecipientList() throws Exception {
replyEndpoint.expectedBodiesReceived("Hello Willem", "Hello Jonathan", "Hello Freeman");
reply2Endpoint.expectedBodiesReceived("Bye Claus", "Bye Jonathan", "Bye Freeman");
outputEndpoint.expectedBodiesReceived("Hello Willem", "Bye Claus", "Bye Jonathan", "Hello Freeman");
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/RecipientListCxf2Test.java b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfRecipientListWithUrlParamsTest.java
similarity index 91%
rename from tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/RecipientListCxf2Test.java
rename to components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfRecipientListWithUrlParamsTest.java
index c755d9f93ee..b69d9de490e 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/RecipientListCxf2Test.java
+++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfRecipientListWithUrlParamsTest.java
@@ -14,10 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.itest.greeter;
-
-import java.util.HashMap;
-import java.util.Map;
+package org.apache.camel.component.cxf;
import org.apache.camel.EndpointInject;
import org.apache.camel.component.cxf.common.message.CxfConstants;
@@ -28,17 +25,20 @@ import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
+import java.util.HashMap;
+import java.util.Map;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
-public class RecipientListCxf2Test extends CamelSpringTestSupport {
+public class CxfRecipientListWithUrlParamsTest extends CamelSpringTestSupport {
private static int port1 = AvailablePortFinder.getNextAvailable();
private static int port2 = AvailablePortFinder.getNextAvailable();
static {
//set them as system properties so Spring can use the property placeholder
//things to set them into the URL's in the spring contexts
- System.setProperty("RecipientListCxf2Test.port1", Integer.toString(port1));
- System.setProperty("RecipientListCxf2Test.port2", Integer.toString(port2));
+ System.setProperty("CxfRecipientListWithUrlParams.port1", Integer.toString(port1));
+ System.setProperty("CxfRecipientListWithUrlParams.port2", Integer.toString(port2));
}
@EndpointInject("mock:reply")
@@ -52,11 +52,11 @@ public class RecipientListCxf2Test extends CamelSpringTestSupport {
@Override
protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/itest/greeter/RecipientListCxf2Test-context.xml");
+ return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/CxfRecipientListWithUrlParamsBeans.xml");
}
@Test
- void testRecipientListCXF2() throws Exception {
+ void testCxfRecipientListWithUrlParams() throws Exception {
replyEndpoint.expectedBodiesReceived("Hello Willem", "Hello Jonathan", "Hello Freeman");
reply2Endpoint.expectedBodiesReceived("Bye Claus", "Bye Jonathan", "Bye Freeman");
outputEndpoint.expectedBodiesReceived("Hello Willem", "Bye Claus", "Bye Jonathan", "Hello Freeman");
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/MulticastCxfTest-context.xml b/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/CxfMulticastBeans.xml
similarity index 91%
rename from tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/MulticastCxfTest-context.xml
rename to components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/CxfMulticastBeans.xml
index af04858e12a..591a5abadf0 100644
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/MulticastCxfTest-context.xml
+++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/CxfMulticastBeans.xml
@@ -30,18 +30,18 @@
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${MulticastCxfTest.port}/SoapContext/SoapPort"
- wsdlURL="wsdl/hello_world.wsdl"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CxfMulticastTest.port}/SoapContext/SoapPort"
+ wsdlURL="/wsdl/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
+ endpointName="s:SoapPort"
serviceName="s:SOAPService"
xmlns:s="http://apache.org/hello_world_soap_http">
</cxf:cxfEndpoint>
<cxf:cxfEndpoint id="serviceEndpoint2" address="http://localhost:9003/SoapContext/SoapPort"
- wsdlURL="wsdl/hello_world.wsdl"
+ wsdlURL="/wsdl/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
+ endpointName="s:SoapPort"
serviceName="s:SOAPService"
xmlns:s="http://apache.org/hello_world_soap_http">
</cxf:cxfEndpoint>
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/RecipientListCxfTest-context.xml b/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/CxfRecipientListBeans.xml
similarity index 89%
rename from tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/RecipientListCxfTest-context.xml
rename to components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/CxfRecipientListBeans.xml
index c5e4e22a5cc..4971a1a19f6 100644
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/RecipientListCxfTest-context.xml
+++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/CxfRecipientListBeans.xml
@@ -29,18 +29,18 @@
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${RecipientListCxfTest.port1}/SoapContext/SoapPort"
- wsdlURL="wsdl/hello_world.wsdl"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CxfRecipientListTest.port1}/SoapContext/SoapPort"
+ wsdlURL="/wsdl/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
+ endpointName="s:SoapPort"
serviceName="s:SOAPService"
xmlns:s="http://apache.org/hello_world_soap_http">
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint id="serviceEndpoint2" address="http://localhost:${RecipientListCxfTest.port2}/SoapContext/SoapPort"
- wsdlURL="wsdl/hello_world.wsdl"
+ <cxf:cxfEndpoint id="serviceEndpoint2" address="http://localhost:${CxfRecipientListTest.port2}/SoapContext/SoapPort"
+ wsdlURL="/wsdl/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
+ endpointName="s:SoapPort"
serviceName="s:SOAPService"
xmlns:s="http://apache.org/hello_world_soap_http">
</cxf:cxfEndpoint>
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/RecipientListCxf2Test-context.xml b/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/CxfRecipientListWithUrlParamsBeans.xml
similarity index 87%
rename from tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/RecipientListCxf2Test-context.xml
rename to components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/CxfRecipientListWithUrlParamsBeans.xml
index 2f25332d851..4fee8cfc2ce 100644
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/RecipientListCxf2Test-context.xml
+++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/CxfRecipientListWithUrlParamsBeans.xml
@@ -31,25 +31,25 @@
<!-- to use from client -->
<cxf:cxfEndpoint id="clientEndpoint"
- wsdlURL="wsdl/hello_world.wsdl"
+ wsdlURL="/wsdl/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
+ endpointName="s:SoapPort"
serviceName="s:SOAPService"
xmlns:s="http://apache.org/hello_world_soap_http">
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${RecipientListCxf2Test.port1}/SoapContext/SoapPort"
- wsdlURL="wsdl/hello_world.wsdl"
+ <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CxfRecipientListWithUrlParams.port1}/SoapContext/SoapPort"
+ wsdlURL="/wsdl/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
+ endpointName="s:SoapPort"
serviceName="s:SOAPService"
xmlns:s="http://apache.org/hello_world_soap_http">
</cxf:cxfEndpoint>
- <cxf:cxfEndpoint id="serviceEndpoint2" address="http://localhost:${RecipientListCxf2Test.port2}/SoapContext/SoapPort"
- wsdlURL="wsdl/hello_world.wsdl"
+ <cxf:cxfEndpoint id="serviceEndpoint2" address="http://localhost:${CxfRecipientListWithUrlParams.port2}/SoapContext/SoapPort"
+ wsdlURL="/wsdl/hello_world.wsdl"
serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
+ endpointName="s:SoapPort"
serviceName="s:SOAPService"
xmlns:s="http://apache.org/hello_world_soap_http">
</cxf:cxfEndpoint>
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/JettyHttpTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyHttpHeadersCompatibilityTest.java
similarity index 96%
rename from tests/camel-itest/src/test/java/org/apache/camel/itest/issues/JettyHttpTest.java
rename to components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyHttpHeadersCompatibilityTest.java
index 50c9c03562e..844933b2e96 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/JettyHttpTest.java
+++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyHttpHeadersCompatibilityTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.itest.issues;
+package org.apache.camel.component.jetty;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
@@ -22,7 +22,7 @@ import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Test;
-public class JettyHttpTest extends CamelTestSupport {
+public class JettyHttpHeadersCompatibilityTest extends CamelTestSupport {
private String targetProducerUri = "http://localhost:8542/someservice?bridgeEndpoint=true&throwExceptionOnFailure=false";
private String targetConsumerUri = "jetty:http://localhost:8542/someservice?matchOnUriPrefix=true";
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/JettyHttpFileCacheTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/file/JettyHttpFileCacheTest.java
similarity index 96%
rename from tests/camel-itest/src/test/java/org/apache/camel/itest/issues/JettyHttpFileCacheTest.java
rename to components/camel-jetty/src/test/java/org/apache/camel/component/jetty/file/JettyHttpFileCacheTest.java
index 8f2c0620764..27ea16dccc8 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/JettyHttpFileCacheTest.java
+++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/file/JettyHttpFileCacheTest.java
@@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.itest.issues;
-
-import java.io.File;
+package org.apache.camel.component.jetty.file;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import java.io.File;
+
import static org.apache.camel.test.junit5.TestSupport.createDirectory;
import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -44,7 +44,7 @@ public class JettyHttpFileCacheTest extends CamelTestSupport {
}
@Test
- void testGetWithRelativePath() throws Exception {
+ void testJettyHttpFileCache() throws Exception {
String response = template.requestBody("http://localhost:8201/clipboard/download/file", " ", String.class);
assertEquals(TEST_STRING, response, "should get the right response");
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/converter/ConvertBodyTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/converter/ConvertBodyTest.java
index af5f8745510..c7af7ffbd0c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/converter/ConvertBodyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/converter/ConvertBodyTest.java
@@ -33,6 +33,10 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
+import java.io.ByteArrayInputStream;
+import java.nio.charset.UnsupportedCharsetException;
+import java.util.Date;
+
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/converter/ConvertHeaderTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/converter/ConvertHeaderTest.java
index c3a5be38fcc..799547701e3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/converter/ConvertHeaderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/converter/ConvertHeaderTest.java
@@ -31,6 +31,10 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
+import java.io.ByteArrayInputStream;
+import java.nio.charset.UnsupportedCharsetException;
+import java.util.Date;
+
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelFileGreeterOneWayTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelFileGreeterOneWayTest.java
deleted file mode 100644
index ebe9450992b..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelFileGreeterOneWayTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.greeter;
-
-import java.io.File;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.itest.utils.extensions.GreeterServiceExtension;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-
-public class CamelFileGreeterOneWayTest extends CamelSpringTestSupport {
- @RegisterExtension
- public static GreeterServiceExtension greeterServiceExtension
- = GreeterServiceExtension.createExtension("CamelFileGreeterOneWayTest.port");
-
- @Test
- void testFileWithOnewayOperation() throws Exception {
- deleteDirectory("target/messages/input/");
- greeterServiceExtension.getGreeter().resetOneWayCounter();
- ProducerTemplate template = context.createProducerTemplate();
- template.sendBodyAndHeader("file://target/messages/input/", "Hello World", Exchange.FILE_NAME, "hello.txt");
-
- // Sleep a while and wait for the message whole processing
- Thread.sleep(4000);
- template.stop();
-
- // make sure the greeter is called
- assertEquals(1, greeterServiceExtension.getGreeter().getOneWayCounter(),
- "The oneway operation of greeter should be called");
-
- File file = new File("target/messages/input/hello.txt");
- assertFalse(file.exists(), "File " + file + " should be deleted");
- }
-
- @Override
- protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/itest/greeter/CamelFileGreeterOneWayTest.xml");
- }
-
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterConsumerTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterConsumerTest.java
deleted file mode 100644
index eab80a16c7c..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterConsumerTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.greeter;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ExchangePattern;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.cxf.common.message.CxfConstants;
-import org.apache.camel.itest.utils.extensions.JmsServiceExtension;
-import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-@CamelSpringTest
-@ContextConfiguration
-public class CamelGreeterConsumerTest {
- @RegisterExtension
- public static JmsServiceExtension jmsServiceExtension = JmsServiceExtension.createExtension();
-
- private static int port = AvailablePortFinder.getNextAvailable();
- static {
- //set them as system properties so Spring can use the property placeholder
- //things to set them into the URL's in the spring contexts
- System.setProperty("CamelGreeterConsumerTest.port", Integer.toString(port));
- }
-
- @Autowired
- protected CamelContext camelContext;
-
- @Test
- void testInvokeServers() {
- assertNotNull(camelContext);
-
- ProducerTemplate template = camelContext.createProducerTemplate();
- List<String> params = new ArrayList<>();
- params.add("Willem");
- Object result = template.sendBodyAndHeader("cxf://bean:serviceEndpoint", ExchangePattern.InOut,
- params, CxfConstants.OPERATION_NAME, "greetMe");
- assertTrue(result instanceof List, "Result is a list instance ");
- assertEquals("HelloWillem", ((List<?>) result).get(0), "Get the wrong response");
-
- template.stop();
- }
-
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterTest.java
deleted file mode 100644
index 2edd22e9f54..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.greeter;
-
-import java.util.List;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Exchange;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.cxf.common.message.CxfConstants;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.itest.utils.extensions.GreeterServiceExtension;
-import org.apache.camel.itest.utils.extensions.JmsServiceExtension;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-@CamelSpringTest
-@ContextConfiguration
-public class CamelGreeterTest {
- @RegisterExtension
- public static GreeterServiceExtension greeterServiceExtension
- = GreeterServiceExtension.createExtension("CamelGreeterTest.port");
-
- @RegisterExtension
- public static JmsServiceExtension jmsServiceExtension = JmsServiceExtension.createExtension();
-
- @Autowired
- protected CamelContext camelContext;
-
- @EndpointInject("mock:resultEndpoint")
- protected MockEndpoint resultEndpoint;
-
- @Test
- void testMocksAreValid() throws Exception {
- assertNotNull(camelContext);
- assertNotNull(resultEndpoint);
-
- ProducerTemplate template = camelContext.createProducerTemplate();
- template.sendBodyAndHeader("jms:requestQueue", "Willem", CxfConstants.OPERATION_NAME, "greetMe");
-
- // Sleep a while and wait for the message whole processing
- Thread.sleep(4000);
- template.stop();
-
- MockEndpoint.assertIsSatisfied(camelContext);
- List<Exchange> list = resultEndpoint.getReceivedExchanges();
- assertEquals(1, list.size(), "Should get one message");
- for (Exchange exchange : list) {
- String result = (String) exchange.getIn().getBody();
- assertEquals("Hello Willem", result, "Get the wrong result ");
- }
- }
-
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/FilePrepareRequest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/FilePrepareRequest.java
deleted file mode 100644
index ecaaaf057fc..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/FilePrepareRequest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.greeter;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.component.cxf.common.message.CxfConstants;
-
-public class FilePrepareRequest implements Processor {
- @Override
- public void process(Exchange exchange) {
- String request = exchange.getIn().getBody(String.class);
- exchange.getMessage().setBody(request);
- exchange.getMessage().setHeader(CxfConstants.OPERATION_NAME, "greetMeOneWay");
- }
-
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareRequest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareRequest.java
deleted file mode 100644
index eadcbbb9966..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareRequest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.greeter;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-
-public class JmsPrepareRequest implements Processor {
-
- @Override
- public void process(Exchange exchange) {
- String request = exchange.getIn().getBody(String.class);
- exchange.getMessage().setHeaders(exchange.getIn().getHeaders());
- exchange.getMessage().setBody(request);
- }
-
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareResponse.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareResponse.java
deleted file mode 100644
index 1f2aa77cb5f..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareResponse.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.greeter;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.component.cxf.common.message.CxfConstants;
-
-public class JmsPrepareResponse implements Processor {
-
- @Override
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- if ("greetMe".equals(in.getHeader(CxfConstants.OPERATION_NAME))) {
- String request = in.getBody(String.class);
- exchange.getMessage().setBody("Hello" + request);
- }
- }
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/Server.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/Server.java
deleted file mode 100644
index dabbaf4ca2e..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/Server.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.greeter;
-
-import jakarta.xml.ws.Endpoint;
-
-import org.apache.camel.itest.utils.extensions.GreeterImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Server {
-
- private static final Logger LOG = LoggerFactory.getLogger(Server.class);
- Endpoint endpoint;
-
- public void start() throws Exception {
- LOG.info("Starting Server");
- Object implementor = new GreeterImpl();
- String address = "http://cxf.apache.org/transports/jms";
- endpoint = Endpoint.publish(address, implementor);
- }
-
- public void stop() {
- if (endpoint != null) {
- endpoint.stop();
- }
- }
-
- public static void main(String[] args) throws Exception {
- Server server = new Server();
- LOG.info("Server ready...");
- server.start();
- Thread.sleep(5 * 60 * 1000);
- LOG.info("Server exiting");
- server.stop();
- System.exit(0);
- }
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/http/InterceptEndpointTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/http/InterceptEndpointTest.java
deleted file mode 100644
index 5d6f0f23b66..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/http/InterceptEndpointTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.http;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.EndpointInject;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-
-@CamelSpringTest
-@ContextConfiguration
-public class InterceptEndpointTest {
-
- @Autowired
- protected CamelContext camelContext;
-
- @EndpointInject("direct:start")
- protected ProducerTemplate producer;
-
- @EndpointInject("mock:result")
- protected MockEndpoint mock;
-
- @Test
- void testMocksIsValid() throws Exception {
- mock.expectedBodiesReceived("Simulated response from Google");
-
- producer.sendBody(null);
-
- mock.assertIsSatisfied();
- }
-
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/IdempotentConsumerTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/IdempotentConsumerTest.java
deleted file mode 100644
index e904a5b08c5..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/IdempotentConsumerTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.idempotent;
-
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class IdempotentConsumerTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractXmlApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml");
- }
-
- @Test
- void testDuplicateMessagesAreFilteredOut() throws Exception {
- getMockEndpoint("mock:result").expectedBodiesReceived("one", "two", "three");
-
- template.sendBodyAndHeader("direct:start", "one", "messageId", 1);
- template.sendBodyAndHeader("direct:start", "two", "messageId", 2);
- template.sendBodyAndHeader("direct:start", "one", "messageId", 1);
- template.sendBodyAndHeader("direct:start", "two", "messageId", 2);
- template.sendBodyAndHeader("direct:start", "three", "messageId", 3);
-
- MockEndpoint.assertIsSatisfied(context);
- }
-
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcIdempotentRepository.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcIdempotentRepository.java
deleted file mode 100644
index af2788f4abc..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcIdempotentRepository.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.idempotent;
-
-import javax.sql.DataSource;
-
-import org.apache.camel.spi.IdempotentRepository;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-public class JdbcIdempotentRepository implements IdempotentRepository {
-
- private JdbcTemplate jdbc;
-
- public void setDataSource(DataSource ds) {
- this.jdbc = new JdbcTemplate(ds);
- }
-
- @Override
- public boolean add(String key) {
- // check we already have it because eager option can have been turned on
- if (contains(key)) {
- return false;
- }
-
- jdbc.update("INSERT INTO ProcessedPayments (paymentIdentifier) VALUES (?)", key);
- return true;
- }
-
- @Override
- public boolean contains(String key) {
- int numMatches
- = jdbc.queryForObject("SELECT count(0) FROM ProcessedPayments where paymentIdentifier = ?", Integer.class, key);
- return numMatches > 0;
- }
-
- @Override
- public boolean remove(String key) {
- jdbc.update("DELETE FROM ProcessedPayments WHERE paymentIdentifier = ?", key);
- return true;
- }
-
- @Override
- public boolean confirm(String key) {
- return true;
- }
-
- @Override
- public void clear() {
- jdbc.update("DELETE * FROM ProcessedPayments");
- }
-
- @Override
- public void start() {
- // noop
- }
-
- @Override
- public void stop() {
- // noop
- }
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/AdviceWithWeaveFirstLastTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/AdviceWithWeaveFirstLastTest.java
deleted file mode 100644
index a0ac07b4b3d..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/AdviceWithWeaveFirstLastTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.issues;
-
-import org.apache.camel.builder.AdviceWith;
-import org.apache.camel.builder.AdviceWithRouteBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-/**
- * Advice with tests
- */
-public class AdviceWithWeaveFirstLastTest extends CamelTestSupport {
-
- @Override
- public boolean isUseAdviceWith() {
- return true;
- }
-
- @Test
- void testWeaveAddFirst() throws Exception {
- // START SNIPPET: e1
- AdviceWith.adviceWith(context.getRouteDefinitions().get(0), context, new AdviceWithRouteBuilder() {
- @Override
- public void configure() {
- // insert at first the given piece of route to the existing route
- weaveAddFirst().to("mock:a").transform(constant("Bye World"));
- }
- });
- // END SNIPPET: e1
-
- context.start();
-
- getMockEndpoint("mock:a").expectedBodiesReceived("Hello World");
- getMockEndpoint("mock:foo").expectedBodiesReceived("Bye World");
- getMockEndpoint("mock:bar").expectedBodiesReceived("Bye World");
- getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
-
- template.sendBody("direct:start", "Hello World");
-
- MockEndpoint.assertIsSatisfied(context);
- }
-
- @Test
- void testWeaveAddLast() throws Exception {
- // START SNIPPET: e2
- AdviceWith.adviceWith(context.getRouteDefinitions().get(0), context, new AdviceWithRouteBuilder() {
- @Override
- public void configure() {
- // insert at the end of the existing route, the given piece of route
- weaveAddLast().to("mock:a").transform(constant("Bye World"));
- }
- });
- // END SNIPPET: e2
-
- context.start();
-
- getMockEndpoint("mock:a").expectedBodiesReceived("Hello World");
- getMockEndpoint("mock:foo").expectedBodiesReceived("Hello World");
- getMockEndpoint("mock:bar").expectedBodiesReceived("Hello World");
- getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
-
- Object out = template.requestBody("direct:start", "Hello World");
- assertEquals("Bye World", out);
-
- MockEndpoint.assertIsSatisfied(context);
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- // START SNIPPET: e5
- from("direct:start")
- .to("mock:foo")
- .to("mock:bar").id("bar")
- .to("mock:result");
- // END SNIPPET: e5
- }
- };
- }
-}
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IntercepFromAndStrategyTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/InterceptFromAndStrategyTest.java
similarity index 95%
rename from tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IntercepFromAndStrategyTest.java
rename to tests/camel-itest/src/test/java/org/apache/camel/itest/issues/InterceptFromAndStrategyTest.java
index 646b92e55ce..69871845165 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IntercepFromAndStrategyTest.java
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/InterceptFromAndStrategyTest.java
@@ -24,7 +24,7 @@ import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Test;
-public class IntercepFromAndStrategyTest extends CamelTestSupport {
+public class InterceptFromAndStrategyTest extends CamelTestSupport {
@EndpointInject("mock:result")
protected MockEndpoint resultEndpoint;
@@ -52,7 +52,7 @@ public class IntercepFromAndStrategyTest extends CamelTestSupport {
// add a dummy strategy
// removing this line the test works
context.getCamelContextExtension().addInterceptStrategy(new DummyInterceptor());
- // intercet from
+ // intercept from
interceptFrom("direct:start").log("Intercepted").to("mock:intercepted");
from("direct:start").to("mock:result");
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IsUseAdviceWithJUnit5Test.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IsUseAdviceWithJUnit5Test.java
deleted file mode 100644
index 88d953cdaba..00000000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/IsUseAdviceWithJUnit5Test.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.camel.itest.issues;
-
-import org.apache.camel.builder.AdviceWith;
-import org.apache.camel.builder.AdviceWithRouteBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-public class IsUseAdviceWithJUnit5Test extends CamelTestSupport {
-
- private String providerEndPointURI = "http://fakeeeeWebsite.com:80";
- private String timerEndPointURI = "timer://myTimer";
- private String mockEndPointURI = "mock:myMock";
- private String directEndPointURI = "direct:myDirect";
-
- @Override
- protected RouteBuilder createRouteBuilder() {
-
- return new RouteBuilder() {
- @Override
- public void configure() {
-
- from(timerEndPointURI).to(providerEndPointURI).to(mockEndPointURI);
- }
- };
- }
-
- @Test
- void testIsUseAdviceWith() throws Exception {
-
- AdviceWith.adviceWith(context.getRouteDefinitions().get(0), context, new AdviceWithRouteBuilder() {
- public void configure() {
-
- replaceFromWith(directEndPointURI);
-
- interceptSendToEndpoint(providerEndPointURI).to("mock:intercepted").skipSendToOriginalEndpoint();
- }
- });
-
- // we must manually start when we are done with all the advice with
- context.start();
-
- getMockEndpoint(mockEndPointURI).expectedBodiesReceived("a trigger");
- getMockEndpoint("mock:intercepted").expectedBodiesReceived("a trigger");
-
- template.sendBody(directEndPointURI, "a trigger");
-
- MockEndpoint.assertIsSatisfied(context);
-
- assertNotNull(context.hasEndpoint(directEndPointURI));
-
- assertNotNull(context.hasEndpoint(mockEndPointURI));
- }
-
- @Override
- public boolean isUseAdviceWith() {
- return true;
- }
-
- @Override
- public boolean isUseRouteBuilder() {
- return true;
- }
-
-}
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelFileGreeterOneWayTest.xml b/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelFileGreeterOneWayTest.xml
deleted file mode 100644
index 9d5900e2c03..00000000000
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelFileGreeterOneWayTest.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cxf="http://camel.apache.org/schema/cxf/jaxws"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/cxf/jaxws http://camel.apache.org/schema/cxf/jaxws/camel-cxf.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- ">
-
- <import resource="classpath:META-INF/cxf/cxf.xml"/>
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CamelFileGreeterOneWayTest.port}/SoapContext/SoapPort"
- wsdlURL="wsdl/hello_world.wsdl"
- serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
- serviceName="s:SOAPService"
- xmlns:s="http://apache.org/hello_world_soap_http">
- </cxf:cxfEndpoint>
-
- <bean id="prepareRequest" class="org.apache.camel.itest.greeter.FilePrepareRequest"/>
-
- <!-- START SNIPPET: example -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="file:target/messages/input?delete=true"/>
- <process ref="prepareRequest"/>
- <to uri="cxf://bean:serviceEndpoint"/>
- </route>
- </camelContext>
- <!-- END SNIPPET: example -->
-
-</beans>
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml b/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml
deleted file mode 100644
index d667e220b66..00000000000
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cxf="http://camel.apache.org/schema/cxf/jaxws"
-
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/cxf/jaxws http://camel.apache.org/schema/cxf/jaxws/camel-cxf.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- ">
-
- <import resource="classpath:META-INF/cxf/cxf.xml"/>
-
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CamelGreeterConsumerTest.port}/SoapContext/SoapPort"
- wsdlURL="wsdl/hello_world.wsdl"
- serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
- serviceName="s:SOAPService"
- xmlns:s="http://apache.org/hello_world_soap_http">
- </cxf:cxfEndpoint>
-
- <bean id="jmsPrepareRequest" class="org.apache.camel.itest.greeter.JmsPrepareRequest"/>
- <bean id="jmsPrepareResponse" class="org.apache.camel.itest.greeter.JmsPrepareResponse"/>
-
- <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
- <property name="connectionFactory">
- <bean class="org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory">
- <property name="brokerURL" value="vm://itest-jms"/>
- </bean>
- </property>
- </bean>
-
- <!-- START SNIPPET: example -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="cxf://bean:serviceEndpoint"/>
- <process ref="jmsPrepareRequest"/>
- <to uri="jms:responseQueue?transferException=true&jmsMessageType=Object"/>
- </route>
- <route>
- <from uri="jms:responseQueue?transferException=true&jmsMessageType=Object"/>
- <process ref="jmsPrepareResponse"/>
- </route>
- </camelContext>
- <!-- END SNIPPET: example -->
-
-</beans>
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterTest-context.xml b/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterTest-context.xml
deleted file mode 100644
index f1c694aaf63..00000000000
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterTest-context.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cxf="http://camel.apache.org/schema/cxf/jaxws"
-
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/cxf/jaxws http://camel.apache.org/schema/cxf/jaxws/camel-cxf.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- ">
-
- <import resource="classpath:META-INF/cxf/cxf.xml"/>
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CamelGreeterTest.port}/SoapContext/SoapPort"
- wsdlURL="wsdl/hello_world.wsdl"
- serviceClass="org.apache.hello_world_soap_http.Greeter"
- endpointName="s:SoapOverHttp"
- serviceName="s:SOAPService"
- xmlns:s="http://apache.org/hello_world_soap_http">
- </cxf:cxfEndpoint>
-
- <bean id="prepareRequest" class="org.apache.camel.itest.greeter.PrepareRequest"/>
- <bean id="prepareResponse" class="org.apache.camel.itest.greeter.PrepareResponse"/>
-
- <bean id="jmsConnectionFactory" class="org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory">
- <property name="brokerURL" value="vm://itest-jms"/>
- </bean>
-
- <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
- <property name="connectionFactory" ref="jmsConnectionFactory"/>
- </bean>
-
- <!-- START SNIPPET: example -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="jms:requestQueue"/>
- <process ref="prepareRequest"/>
- <to uri="cxf://bean:serviceEndpoint"/>
- <process ref="prepareResponse"/>
- <to uri="jms:responseQueue"/>
- <to uri="mock:resultEndpoint"/>
- </route>
- </camelContext>
- <!-- END SNIPPET: example -->
-
-</beans>
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/http/InterceptEndpointTest-context.xml b/tests/camel-itest/src/test/resources/org/apache/camel/itest/http/InterceptEndpointTest-context.xml
deleted file mode 100644
index d4d4d0d8c6a..00000000000
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/http/InterceptEndpointTest-context.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- ">
-
- <!-- START SNIPPET: e1 -->
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring" trace="true">
- <!-- intercept the request to google and return our own simulated response -->
- <!-- and we skip sending to the original endpoint -->
- <interceptSendToEndpoint uri="http://www.google.com" skipSendToOriginalEndpoint="true">
- <transform>
- <constant>Simulated response from Google</constant>
- </transform>
- </interceptSendToEndpoint>
-
- <route>
- <from uri="direct:start"/>
- <to uri="http://www.google.com"/>
- <to uri="mock:result"/>
- </route>
- </camelContext>
- <!-- END SNIPPET: e1 -->
-
-</beans>
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml b/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml
deleted file mode 100644
index 665326eb294..00000000000
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:jdbc="http://www.springframework.org/schema/jdbc"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- ">
-
- <jdbc:embedded-database id="dataSource" type="DERBY">
- <jdbc:script location="classpath:sql/init.sql" />
- </jdbc:embedded-database>
-
- <bean id="myRepo" class="org.apache.camel.itest.idempotent.JdbcIdempotentRepository">
- <property name="dataSource" ref="dataSource"/>
- </bean>
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:start"/>
- <idempotentConsumer idempotentRepository="myRepo">
- <header>messageId</header>
- <to uri="mock:result"/>
- </idempotentConsumer>
- </route>
- </camelContext>
-
-</beans>