@Test public void testDoStopTwice() throws Exception { OsgiDefaultProducer producer = createProducer(Collections.singletonMap("key", (Object) "value")); ServiceHelper.startService(producer); ServiceHelper.stopService(producer); ServiceHelper.stopService(producer); verify(producer.getApplicationBundleContext()).removeServiceListener(Matchers.any(ServiceListener.class)); }
protected BundleContext getApplicationBundleContext() { return getEndpoint().getApplicationBundleContext(); }
OsgiDefaultProducer extends DefaultProducer { protected BundleContext getApplicationBundleContext() { return getEndpoint().getApplicationBundleContext(); } }
OsgiDefaultProducer extends DefaultProducer { protected BundleContext getApplicationBundleContext() { return getEndpoint().getApplicationBundleContext(); } OsgiDefaultProducer(OsgiDefaultEndpoint endpoint, Map<String, Object> props); }
OsgiDefaultProducer extends DefaultProducer { protected BundleContext getApplicationBundleContext() { return getEndpoint().getApplicationBundleContext(); } OsgiDefaultProducer(OsgiDefaultEndpoint endpoint, Map<String, Object> props); @Override void process(Exchange exchange); @Override OsgiDefaultEndpoint getEndpoint(); }
OsgiDefaultProducer extends DefaultProducer { protected BundleContext getApplicationBundleContext() { return getEndpoint().getApplicationBundleContext(); } OsgiDefaultProducer(OsgiDefaultEndpoint endpoint, Map<String, Object> props); @Override void process(Exchange exchange); @Override OsgiDefaultEndpoint getEndpoint();  }