@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.emptySet(), context);
    service.finalizeModule();

    verify(context);
  }
Verify stack resolution for single sign-on details

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/stack/ServiceModuleTest.java