@Test public void testCreateProcessor() throws Exception { CamelContext camelContext = mock(CamelContext.class); OsgiDefaultEndpoint endpoint = mock(OsgiDefaultEndpoint.class); when(endpoint.getCamelContext()).thenReturn(camelContext); OsgiRandomProducer producer = new OsgiRandomProducer(endpoint, Collections.<String, Object>emptyMap()); assertThat(producer.createProcessor(), instanceOf(RandomLoadBalancer.class)); }
@Override protected Processor createProcessor() { return new RandomLoadBalancer() { @Override public List<Processor> getProcessors() { return services; } }; }
OsgiRandomProducer extends OsgiDefaultProducer { @Override protected Processor createProcessor() { return new RandomLoadBalancer() { @Override public List<Processor> getProcessors() { return services; } }; } }
OsgiRandomProducer extends OsgiDefaultProducer { @Override protected Processor createProcessor() { return new RandomLoadBalancer() { @Override public List<Processor> getProcessors() { return services; } }; } OsgiRandomProducer(OsgiDefaultEndpoint endpoint, Map<String, Object> props); }
OsgiRandomProducer extends OsgiDefaultProducer { @Override protected Processor createProcessor() { return new RandomLoadBalancer() { @Override public List<Processor> getProcessors() { return services; } }; } OsgiRandomProducer(OsgiDefaultEndpoint endpoint, Map<String, Object> props);  }
OsgiRandomProducer extends OsgiDefaultProducer { @Override protected Processor createProcessor() { return new RandomLoadBalancer() { @Override public List<Processor> getProcessors() { return services; } }; } OsgiRandomProducer(OsgiDefaultEndpoint endpoint, Map<String, Object> props);   }