private ServiceModule createServiceModule(ServiceInfo serviceInfo) {
    String configType = "type1";

    if (serviceInfo.getName() == null) {
      serviceInfo.setName("service1");
    }

    StackContext context = createStackContext(serviceInfo.getName(), true);
    // no config props
    ConfigurationInfo configInfo = createConfigurationInfo(Collections.emptyList(),
        Collections.emptyMap());

    ConfigurationModule module = createConfigurationModule(configType, configInfo);
    ConfigurationDirectory configDirectory = createConfigurationDirectory(Collections.singletonList(module));
    ServiceDirectory serviceDirectory = createServiceDirectory(serviceInfo.getConfigDir(), configDirectory);

    return createServiceModule(context, serviceInfo, serviceDirectory);
  }
Verify stack resolution for single sign-on details

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