@Test
  public void lifeVersionConflictTest() throws Exception {
    HashMap<String, List<MockServer>> dcToMockServers = new HashMap<>();
    serverLayout.getMockServers()
        .forEach(server -> dcToMockServers.computeIfAbsent(server.getDataCenter(), k -> new ArrayList()).add(server));
    List<String> dcs = new ArrayList<>(dcToMockServers.keySet());
    for (String blobId : blobIds) {
      deleteBlobInAllServer(blobId);
      // Randomly pick a datacenter and change the lifeVersion of first two mock server to 5.
      int dcIdx = TestUtils.RANDOM.nextInt(dcs.size());
      List<MockServer> servers = dcToMockServers.get(dcs.get(dcIdx));
      for (int i = 0; i < 2; i++) {
        StoredBlob blob = servers.get(i).getBlobs().get(blobId);
        blob.lifeVersion = 5;
      }
      executeOpAndVerify(Collections.singleton(blobId), RouterErrorCode.LifeVersionConflict);
    }
  }
Failure tests when at least two servers in a datacenter return different lifeVersion, which
causes lifeVersion conflict error.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/UndeleteManagerTest.java