@Test
public void testCheckHealth() throws Exception {

  String[] args = {"-checkHealth", "rm1"};
  // RM HA is disabled.
  // getServiceState should not be executed
  assertEquals(-1, rmAdminCLI.run(args));
  verify(haadmin, never()).monitorHealth();
  // Now RM HA is enabled.
  // getServiceState should be executed
  assertEquals(0, rmAdminCLIWithHAEnabled.run(args));
  verify(haadmin).monitorHealth();
}