On Sun, May 8, 2011 at 1:44 PM, Tarjei Huse <tar...@scanmine.com> wrote: > Hi, > > I got a route like this: > from(bookKeeperQueue).routeId("BookKeeperRoute") > .process(new BookKeeperProcessor(bookKeeper)); > > That I would like to test by appending a mock endpoint to the route and > avaiting for it to receive the message. > > I could add a .to(log:something) at the end of the route, but I would > find it more pleasing if I could just append an endpoint to the route > using the new adviceWith() functionality. > > Is this possible? >
Yeah there is AdviceWithRouteBuilder that can help with this http://camel.apache.org/advicewith.html But we could probably improve it a bit by adding a method to more easily addLast, which could be common to do. Eg to add a mock at the end. Likewise you may want to add a mock at the start, so we could have an addFirst as well. > -- > Regards / Med vennlig hilsen > Tarjei Huse > Mobil: 920 63 413 > > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com CamelOne 2011: http://fusesource.com/camelone2011/ Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/