@Test public void testServiceCheckNotRegisteredForDeletedService() throws Exception { ServiceInfo info = new ServiceInfo(); info.setName("service1"); info.setCommandScript(createNiceMock(CommandScriptDefinition.class)); info.setDeleted(true); StackContext context = createStackContext(info.getName(), false); ServiceModule service = createServiceModule(info, Collections.<ConfigurationModule>emptySet(), context); service.finalizeModule(); verify(context); }