Hi No it ought to work with that little route as well.
What version of Camel do you use? On Sun, May 21, 2017 at 4:14 PM, Peter Hicks (Poggs) <[email protected]> wrote: > Hello > > I’m unsure whether this is down to my inexperience with Camel or an actual > bug, but I wanted to bring it up here regardless. > > I have a Camel component which processes an Exchange and sends multiple > messages in response. It’s part of a larger piece of code which translates > ‘commands’ from one system in to ‘operations’ to carry out on another system. > > One of the unit tests extends CamelTestSupport and has a RouteBuilder which > returns the following: > > return new RouteBuilder() { > public void configure() { > from("direct:start").process(testBean); > from("direct:start.processed").to("mock:result.processed"); > } > }; > > When running this unit test, the correct data is output but I have the > following NPE: > > java.lang.NullPointerException > at > org.apache.camel.test.junit4.CamelTestSupport.logCoverageSummary(CamelTestSupport.java:463) > at > org.apache.camel.test.junit4.CamelTestSupport.tearDown(CamelTestSupport.java:402) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > ... > > If I simply add ".to("mock:result”)” to the end of the first route, the NPE > disappears. > > Is this a problem in my implementation? > > > Peter > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
