@Test
public void testRefreshNodesGracefulInvalidArgs() throws Exception {

  // invalid graceful timeout parameter
  String[] invalidArgs = {"-refreshNodes", "-ginvalid", "invalid", "-client"};
  assertEquals(-1, rmAdminCLI.run(invalidArgs));
  // invalid timeout
  String[] invalidTimeoutArgs = {"-refreshNodes", "-g", "invalid", "-client"};
  assertEquals(-1, rmAdminCLI.run(invalidTimeoutArgs));
  // negative timeout
  String[] negativeTimeoutArgs = {"-refreshNodes", "-g", "-1000", "-client"};
  assertEquals(-1, rmAdminCLI.run(negativeTimeoutArgs));
  // invalid tracking mode
  String[] invalidTrackingArgs = {"-refreshNodes", "-g", "1", "-foo"};
  assertEquals(-1, rmAdminCLI.run(invalidTrackingArgs));
}