Activator implements BundleActivator { @Override public void start(BundleContext context) { Dictionary<String,String> props = new Hashtable<String,String>(); props.put(Constants.SERVICE_PID, ConfigurationService.PID); context.registerService(ManagedService.class.getName(), ConfigurationService.getInstance(), props); }  @Override void start(BundleContext context); @Override void stop(BundleContext arg0);  }
@Test public void testStartStop() throws Exception { Dictionary<String,String> props = new Hashtable<String,String>(); props.put(Constants.SERVICE_PID, ConfigurationService.PID); Activator activator = new Activator(); activator.start(bc); verify(bc).registerService(eq(ManagedService.class.getName()), eq(ConfigurationService.getInstance()), eq(props)); }