OsgiDefaultProducer extends DefaultProducer { protected Processor createProcessor() { return new OsgiDefaultLoadBalancer() { @Override public List<Processor> getProcessors() { return services; } }; } OsgiDefaultProducer(OsgiDefaultEndpoint endpoint, Map<String, Object> props); @Override void process(Exchange exchange); @Override OsgiDefaultEndpoint getEndpoint();  }
@Test public void testCreateProcessor() throws Exception { OsgiDefaultProducer producer = createProducer(Collections.<String, Object>emptyMap()); Processor processor = producer.createProcessor(); assertThat(processor, instanceOf(OsgiDefaultLoadBalancer.class)); assertThat(((LoadBalancer) processor).getProcessors(), instanceOf(OsgiServiceList.class)); }