@Test
  public void testService() throws Exception {
    List<ServiceTestInvocation> listTestInvocations = getTestInvocations();
    for (ServiceTestInvocation testInvocation : listTestInvocations) {
      testMethod(testInvocation);
      testMethod_bodyParseException(testInvocation);
      testMethod_resultInErrorState(testInvocation);
    }
  }
Base class for service unit tests.
ambari-server/src/test/java/org/apache/ambari/server/api/services/BaseServiceTest.java