OsgiDefaultEndpoint extends DefaultEndpoint { @Override public Producer createProducer() throws Exception { return new OsgiDefaultProducer(this, getProps()); } OsgiDefaultEndpoint(String endpointUri, Component component); @Override Consumer createConsumer(Processor processor); @Override Producer createProducer(); @Override boolean isSingleton(); @Override OsgiComponent getComponent(); Map<String, Object> getProps(); void setProps(Map<String, Object> props);  }
@Test public void testCreateProducer() throws Exception { OsgiDefaultEndpoint endpoint = createEndpoint(); endpoint.setProps(Collections.<String, Object>singletonMap("key", "value")); assertThat(endpoint.createProducer(), instanceOf(OsgiDefaultProducer.class)); }
@Test public void testCreateProducerNoProps() throws Exception { OsgiDefaultEndpoint endpoint = createEndpoint(); assertThat(endpoint.createProducer(), instanceOf(OsgiDefaultProducer.class)); }