I have a routes defined in CamelRoutes.xml and I would like to test them by using the wrapping technique described at the bottom of http://camel.apache.org/mock.html.
My CamelRoutes.xml <route autoStartup="true" xmlns="http://camel.apache.org/schema/spring "> <from uri="direct:start"/> <to uri="direct:end"/> </route> So I created CamelRoutesTest.xml containing: <import resource="CamelRoutes.xml"/> <bean id="mockAllEndpoints" class="org.apache.camel.impl.InterceptSendToMockEndpointStrategy"/> but I am not sure how to create a test that both loads the spring xml AND provides access to the mock endpoints. If I use.. @ContextConfiguration( locations=("/CamelRoutesTest")) public class CamelTest extends AbstractJUnit38SpringContextTests } then I have no idea how to *get* the mock endpoints If I use.. public class CamelTest extends CamelTestSupport } then I dont know how to load my camel context.. I can't seem to find an example test on the website that uses CamelTestSupport AND loads routes from spring xml. thanks, Tom