private StackContext createStackContext(String serviceName, boolean expectServiceRegistration) {
    StackContext context = createStrictMock(StackContext.class);

    if (expectServiceRegistration) {
      context.registerServiceCheck(serviceName);
    }
    replay(context);

    return context;
  }
Verify stack resolution for single sign-on details

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