private static void checkBlobId(Router router, BlobId blobId, byte[] data) throws Exception {
    GetBlobResult result =
        router.getBlob(blobId.getID(), new GetBlobOptionsBuilder().build()).get(20, TimeUnit.SECONDS);
    ReadableStreamChannel blob = result.getBlobDataChannel();
    assertEquals("Size does not match that of data", data.length,
        result.getBlobInfo().getBlobProperties().getBlobSize());
    RetainingAsyncWritableChannel channel = new RetainingAsyncWritableChannel();
    blob.readInto(channel, null).get(1, TimeUnit.SECONDS);

    try (InputStream is = channel.consumeContentAsInputStream()) {
      assertArrayEquals(data, Utils.readBytesFromStream(is, (int) channel.getBytesWritten()));
    }
  }
Repeatedly check the replication token file until a certain offset value on all nodes on a certain
partition is found.  Fail if {@code numTries} is exceeded or a token offset larger than the target
is found.
@param clusterMap the cluster map that contains the data node to inspect
@param dataNodeId the data node to inspect
@param targetOffset the token offset to look for in the {@code targetPartition}
@param targetPartition the name of the partition to look for the {@code targetOffset}
@throws Exception
ambry-test-utils/src/main/java/com/github/ambry/server/ServerTestUtil.java