I usually use one of two ways. The first is to override createRegistry and add your bean implementation there: @Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); registry.bind( "bean-id", new BeanClass() ); return registry; } The second is to create another blueprint.xml in src/test/resource/OSGI-INF/blueprint that creates your bean and then add it to the list of descriptors returned from getBlueprintDescriptor()
> On Feb 4, 2016, at 11:32 AM, enigma <send2she...@gmail.com> wrote: > > Hi, > I have a Junit test class extending CamelBlueprintTestSupport. The route has > reference to a POJO bean. When I execute the test method, I see the > following message - > Caused by: org.apache.camel.NoSuchBeanException: No bean could be found in > the registry for: requestBean > > How do I add the POJO bean reference to the registery when using > CamelBlueprintTestSupport ? > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/CamelBlueprintTestSupport-No-bean-could-be-found-in-the-registry-tp5777228.html > Sent from the Camel - Users mailing list archive at Nabble.com.