Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.13.3, 2.14.1
-
None
-
Unknown
Description
Update AdviceWithTypeTest test class to contain the below. On Camel-2.13.2 and below the test case would pass, on 2.13.3 and above the test case fails.
AdviceWithTypeTest.java
public void testUnknownType2() throws Exception { context.getRouteDefinitions().get(0).adviceWith(context, new AdviceWithRouteBuilder() { @Override public void configure() throws Exception { weaveByType(ChoiceDefinition.class).replace().to("mock:baz"); } }); getMockEndpoint("mock:baz").expectedMessageCount(1); template.sendBody("direct:start", "World"); assertMockEndpointsSatisfied(); } @Override protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { // START SNIPPET: e5 from("direct:start") .transform(simple("Hello ${body}")) .log("Got ${body}") .to("mock:result") .choice() .when(header("foo").isEqualTo("bar")) .to("mock:resultA") .otherwise() .to("mock:resultB"); // END SNIPPET: e5 } }; }