package camelinaction; import org.apache.camel.test.spring.CamelSpringTestSupport; import org.junit.Test; import org.springframework.context.support.AbstractXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Dynamic Router EIP example using Spring XML */ public class SpringDynamicRouterAnnotationTest extends CamelSpringTestSupport { @Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/dynamicrouter-annotation.xml"); } @Test public void testDynamicRouter() throws Exception { getMockEndpoint("mock:a").expectedBodiesReceived("Camel"); getMockEndpoint("mock:result").expectedBodiesReceived("Bye Camel"); template.sendBody("direct:start", "Camel"); assertMockEndpointsSatisfied(); } }