@Test
  public void badArgsTest() throws Exception {
    doBadArgsTest(null, "100", RestServiceErrorCode.MissingArgs);
    doBadArgsTest("host", null, RestServiceErrorCode.MissingArgs);
    doBadArgsTest("host", "abc", RestServiceErrorCode.InvalidArgs);
    doBadArgsTest("non-existent-host", "100", RestServiceErrorCode.NotFound);
    String host = TailoredPeersClusterMap.DATANODE_NAMES[0].split(":")[0];
    doBadArgsTest(host, "-1", RestServiceErrorCode.NotFound);
  }
Tests cases where the arguments are either missing, incorrect or do no refer to known datanodes.
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/GetPeersHandlerTest.java