Details
Description
We should likely add a nicer API for testing camel routes with the adviceWith functionality. Today you have to use a RouteReifier from camel-core. We should make a new API in camel-api and make it with a nicer name so its easier to understand and use.
RouteReifier.adviceWith(context.getRouteDefinitions().get(0), context, new RouteBuilder() { @Override public void configure() throws Exception { // intercept sending to mock:foo and do something else interceptSendToEndpoint("mock:foo") .skipSendToOriginalEndpoint() .to("log:foo") .to("mock:advised"); } });