Hello, I love the test-support of camel. Unfortunately, currently I have a problem: I want to create a route which uses a PollEnrich-component. And I want to write a test which mocks away the URI which is used by the pollEnrich-component.
But I cannot manage this. I tried the following test, which fails. This means: Firstly the assertMockEndpointsSatisfied fails and secondly, when the route is executed it in fact accesses the endpoint file:asfd. (But it should not use this file since I wanted to mock it away) Any hints, how I can manage that the pollEnrich is mocked? @@Test public class TestPollEnrich extends CamelTestSupport { @Override public String isMockEndpointsAndSkip() { return "file:*"; } public void testStdFlow() throws Exception { getMockEndpoint("mock://file:asfd").expectedMessageCount(1); super.sendBody("direct:start", "egal"); assertMockEndpointsSatisfied(); } @Override protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from("direct:start").pollEnrich("file:asfd"); } }; } } -- View this message in context: http://camel.465427.n5.nabble.com/testing-pollEnrich-via-mock-tp5716258.html Sent from the Camel - Users mailing list archive at Nabble.com.