@Test
  public void getReplicasWithBadInputTest() {
    // bad input - invalid blob id.
    try {
      getReplicasHandler.getReplicas("12345", new MockRestResponseChannel());
      fail("Exception should have been thrown because the blobid is invalid");
    } catch (RestServiceException e) {
      assertEquals("Unexpected RestServiceErrorCode", RestServiceErrorCode.NotFound, e.getErrorCode());
    }

    // bad input - invalid blob id for this cluster map.
    String blobId = "AAEAAQAAAAAAAADFAAAAJDMyYWZiOTJmLTBkNDYtNDQyNS1iYzU0LWEwMWQ1Yzg3OTJkZQ.gif";
    try {
      getReplicasHandler.getReplicas(blobId, new MockRestResponseChannel());
      fail("Exception should have been thrown because the blobid is invalid");
    } catch (RestServiceException e) {
      assertEquals("Unexpected RestServiceErrorCode", RestServiceErrorCode.NotFound, e.getErrorCode());
    }
  }
Tests reactions of the {@link GetReplicasHandler#getReplicas(String, RestResponseChannel)} operation to bad input -
specifically if we do not include required parameters.
ambry-frontend/src/test/java/com/github/ambry/frontend/GetReplicasHandlerTest.java