@Test
  public void successUndeleteWithSomeServerError() throws Exception {
    for (String blobId : blobIds) {
      deleteBlobInAllServer(blobId);
    }
    HashMap<String, List<MockServer>> dcToMockServers = new HashMap<>();
    serverLayout.getMockServers()
        .forEach(server -> dcToMockServers.computeIfAbsent(server.getDataCenter(), k -> new ArrayList()).add(server));

    List<ServerErrorCode> errorCodes = new ArrayList<>();
    errorCodes.add(ServerErrorCode.BlobNotFound);
    errorCodes.add(ServerErrorCode.BlobNotDeleted);
    errorCodes.add(ServerErrorCode.DiskUnavailable);

    int i = 0;
    for (Map.Entry<String, List<MockServer>> entry : dcToMockServers.entrySet()) {
      entry.getValue().get(0).setServerErrorForAllRequests(errorCodes.get(i++));
    }

    for (String blobId : blobIds) {
      executeOpAndVerify(Collections.singleton(blobId), null);
    }
  }
Tests when each one of the hosts in all three datacenter returns an error code but stil undelete has the global quorum.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/UndeleteManagerTest.java