public static MaintenanceStateHelper getMaintenanceStateHelperInstance(
    Clusters clusters) throws NoSuchFieldException, IllegalAccessException {
    Injector injector = createNiceMock(Injector.class);
    injector.injectMembers(anyObject(MaintenanceStateHelper.class));
    EasyMock.expectLastCall().once();
    replay(injector);

    MaintenanceStateHelper maintenanceStateHelper = new MaintenanceStateHelper(injector);
    injectField(maintenanceStateHelper, clusters);
    return maintenanceStateHelper;
  }
Tests that the service MM state is calculated correctly for an alert.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/controller/MaintenanceStateHelperTest.java