protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:foo")
.errorHandler(new ErrorHandlerBuilderRef("myDLC"))
.to("mock:foo")
.throwException(new IllegalArgumentException("Damn Foo"));
from("direct:start")
.errorHandler(new ErrorHandlerBuilderRef("myDLC"))
.onException(IllegalArgumentException.class)
.handled(true)
.to("mock:handled")
.end()
.to("mock:a")