use of org.apache.camel.FailedToCreateRouteException in project camel by apache.
the class AdviceWithReplaceFromTest method testReplaceFromInvalidUri.
public void testReplaceFromInvalidUri() throws Exception {
try {
context.getRouteDefinitions().get(0).adviceWith(context, new AdviceWithRouteBuilder() {
@Override
public void configure() throws Exception {
replaceFromWith("xxx:foo");
}
});
fail("Should have thrown exception");
} catch (FailedToCreateRouteException e) {
assertIsInstanceOf(ResolveEndpointFailedException.class, e.getCause());
}
}
Aggregations