Then I think I method like the following in CamelTestSupport public void replaceRouteFromWith(String routeId, String fromEndpoint) { fromEndpoints.put(routeId, fromEndpoint); }
and some additions to doSetUp() for (final Map.Entry<String, String> entry : fromEndpoints.entrySet()) { context.getRouteDefinition(entry.getKey()).adviceWith(context, new AdviceWithRouteBuilder() { @Override public void configure() throws Exception { replaceFromWith(entry.getValue()); } }); } would be useful for replacing from endpoints in tests. I will add that soon if there are no objections. Bilgin On 11 July 2013 18:16, Claus Ibsen <claus.ib...@gmail.com> wrote: > No there is not. > > On Mon, Jul 1, 2013 at 6:55 PM, Bilgin Ibryam <bibr...@gmail.com> wrote: >> Hi, >> >> with CamelTestSupport I can use isMockEndpointsAndSkip method to mock >> existing endpoints, but for mocking the consumer endpoint I still have to >> use AdviceWithRouteBuilder. >> >> Is there a method in CamelTestSupport that I can override and mock the >> consumer endpoints? >> >> Thanks >> Bilgin > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: cib...@redhat.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen