private static void checkBlobContent(MockClusterMap clusterMap, BlobId blobId, ConnectedChannel channel,
      byte[] dataToCheck, byte[] encryptionKey) throws IOException, MessageFormatException {
    ArrayList<BlobId> listIds = new ArrayList<BlobId>();
    listIds.add(blobId);
    ArrayList<PartitionRequestInfo> partitionRequestInfoList = new ArrayList<PartitionRequestInfo>();
    partitionRequestInfoList.clear();
    PartitionRequestInfo partitionRequestInfo = new PartitionRequestInfo(blobId.getPartition(), listIds);
    partitionRequestInfoList.add(partitionRequestInfo);
    GetRequest getRequest3 =
        new GetRequest(1, "clientid2", MessageFormatFlags.Blob, partitionRequestInfoList, GetOption.None);
    DataInputStream stream = channel.sendAndReceive(getRequest3).getInputStream();
    GetResponse resp = GetResponse.readFrom(stream, clusterMap);
    Assert.assertEquals(ServerErrorCode.NoError, resp.getError());
    BlobData blobData = MessageFormatRecord.deserializeBlob(resp.getInputStream());
    byte[] blobout = getBlobData(blobData);
    assertArrayEquals(dataToCheck, blobout);
    if (encryptionKey != null) {
      assertNotNull("EncryptionKey should not have been null",
          resp.getPartitionResponseInfoList().get(0).getMessageMetadataList().get(0));
      Assert.assertArrayEquals("EncryptionKey mismatch", encryptionKey,
          resp.getPartitionResponseInfoList().get(0).getMessageMetadataList().get(0).getEncryptionKey().array());
    } else {
      assertNull("EncryptionKey should have been null",
          resp.getPartitionResponseInfoList().get(0).getMessageMetadataList().get(0));
    }
    releaseNettyBufUnderneathStream(stream);
  }
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