Does Camel have some built in functionality to replace a Bean within a
Route while maintaining the method called on the bean?
For instance, given the RouteBuilder below, I would like to replace myBean
with myMockBean during testing. I've considered using AdviceWith, but that
seams to replace the entire Bean Node rather than just the instance of the
class used by the Bean Node.
public class MyRouteBuilder extends RouteBuilder
{
@BeanInject
private MyBean myBean;
@Override
public void configure() throws Exception
{
from("direct:myEndpoint")
.bean(myBean, "myMethod")
.id("myBeanId");
}
}