Camel Test throwing UnsupportedOperation when route have a ChoiceDefinition in Fuse
Issue
- While running a camel route test we get an UnsupportedOperationException, if we use the method
weaveAddLastfrom the classAdviceWithRouteBuilderand my route has aChoiceDefinition. - We have the this code as below,
context.getRouteDefinition("choiceTestRoute").adviceWith(context, new AdviceWithRouteBuilder() {
@Override
public void configure() throws Exception {
weaveAddLast().to("mock:endpoint");
}
});
MockEndpoint mockEndpoint = getMockEndpoint("mock:endpoint");
mockEndpoint.expectedMessageCount(1);
context.start();
producerTemplate.sendBody("direct:start", Integer.valueOf(1));
assertMockEndpointsSatisfied();
Environment
- Red Hat JBoss Fuse
- 6.x
- Apache Camel
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
