@Test
  public void singleFailureInBatchUndeleteTest() throws Exception {
    HashMap<String, List<MockServer>> dcToMockServers = new HashMap<>();
    serverLayout.getMockServers()
        .forEach(server -> dcToMockServers.computeIfAbsent(server.getDataCenter(), k -> new ArrayList()).add(server));
    String dc = new ArrayList<>(dcToMockServers.keySet()).get(0);
    List<MockServer> servers = dcToMockServers.get(dc);

    for (String blobId : blobIds) {
      deleteBlobInAllServer(blobId);
    }

    // Only set the first two server's error code to be blob not found, since first two servers
    // are in the same datacenter, and undelete requires a global quorum.
    for (MockServer server : servers.subList(0, 2)) {
      server.setServerErrorForAllRequests(ServerErrorCode.BlobNotFound);
    }
    executeOpAndVerify(blobIds, RouterErrorCode.BlobDoesNotExist);
    serverLayout.getMockServers().forEach(server -> server.resetServerErrors());
  }
Failure tests when two servers in a datacenter return blob_not_found. It fails one undelete request and thus fails
all the blobs in the same batch.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/UndeleteManagerTest.java