@Test public void deleteForNonExistingId(){ Bundle bundle = mock(Bundle.class); BundleContext bundleContext = mock(BundleContext.class); when(bundle.getBundleContext()).thenReturn(bundleContext); ManagedProcessEngineFactoryImpl factory = new ManagedProcessEngineFactoryImpl(bundle); factory.deleted("notRegisteredId"); }
@Override public void deleted(String pid) { ProcessEngine engine = existingEngines.get(pid); if (engine != null) { engine.close(); existingEngines.remove(pid); existingRegisteredEngines.get(pid).unregister(); existingRegisteredEngines.remove(pid); } }
ManagedProcessEngineFactoryImpl implements ManagedProcessEngineFactory { @Override public void deleted(String pid) { ProcessEngine engine = existingEngines.get(pid); if (engine != null) { engine.close(); existingEngines.remove(pid); existingRegisteredEngines.get(pid).unregister(); existingRegisteredEngines.remove(pid); } } }
ManagedProcessEngineFactoryImpl implements ManagedProcessEngineFactory { @Override public void deleted(String pid) { ProcessEngine engine = existingEngines.get(pid); if (engine != null) { engine.close(); existingEngines.remove(pid); existingRegisteredEngines.get(pid).unregister(); existingRegisteredEngines.remove(pid); } } ManagedProcessEngineFactoryImpl();  ManagedProcessEngineFactoryImpl(Bundle bundle); }
ManagedProcessEngineFactoryImpl implements ManagedProcessEngineFactory { @Override public void deleted(String pid) { ProcessEngine engine = existingEngines.get(pid); if (engine != null) { engine.close(); existingEngines.remove(pid); existingRegisteredEngines.get(pid).unregister(); existingRegisteredEngines.remove(pid); } } ManagedProcessEngineFactoryImpl();  ManagedProcessEngineFactoryImpl(Bundle bundle); @Override String getName(); @Override void updated(String pid, Dictionary properties); @Override void deleted(String pid); }
ManagedProcessEngineFactoryImpl implements ManagedProcessEngineFactory { @Override public void deleted(String pid) { ProcessEngine engine = existingEngines.get(pid); if (engine != null) { engine.close(); existingEngines.remove(pid); existingRegisteredEngines.get(pid).unregister(); existingRegisteredEngines.remove(pid); } } ManagedProcessEngineFactoryImpl();  ManagedProcessEngineFactoryImpl(Bundle bundle); @Override String getName(); @Override void updated(String pid, Dictionary properties); @Override void deleted(String pid);  }