@Test public void testRegisterAllServices (){ DummyClass2 service = new DummyClass2(); ServiceRegistration s = mock(ServiceRegistration.class); ServiceRegistration s2 = mock(ServiceRegistration.class); when(bc.registerService(eq(DummyInterface2.class.getName()), same(service), any(Dictionary.class))).thenReturn(s2); when(bc.registerService(eq(DummyInterface.class.getName()), same(service), any(Dictionary.class))).thenReturn(s); Properties props = mock(Properties.class); activator.registerAllServices(bc, service, props); assertEquals(2, activator.getServiceRegistrations().size()); assertTrue(activator.getServiceRegistrations().get(DummyInterface2.class).get(service).equals(s2)); assertTrue(activator.getServiceRegistrations().get(DummyInterface.class).get(service).equals(s)); }
protected final void registerAllServices(final BundleContext bc, final Object service, final Properties props) { ServiceUtil.registerAllServices(bc, service, props, serviceRegistrations); }
AbstractCyActivator implements BundleActivator { protected final void registerAllServices(final BundleContext bc, final Object service, final Properties props) { ServiceUtil.registerAllServices(bc, service, props, serviceRegistrations); } }
AbstractCyActivator implements BundleActivator { protected final void registerAllServices(final BundleContext bc, final Object service, final Properties props) { ServiceUtil.registerAllServices(bc, service, props, serviceRegistrations); } AbstractCyActivator(); }
AbstractCyActivator implements BundleActivator { protected final void registerAllServices(final BundleContext bc, final Object service, final Properties props) { ServiceUtil.registerAllServices(bc, service, props, serviceRegistrations); } AbstractCyActivator(); final void stop(BundleContext bc); void shutDown(); }
AbstractCyActivator implements BundleActivator { protected final void registerAllServices(final BundleContext bc, final Object service, final Properties props) { ServiceUtil.registerAllServices(bc, service, props, serviceRegistrations); } AbstractCyActivator(); final void stop(BundleContext bc); void shutDown();  }