private void sendBlobToDataNode(DataNodeId dataNode, int blobSize, Map<BlobId, Integer> blobIdToSizeMap)
      throws Exception {
    int userMetaDataSize = 100;
    // Send blobs to DataNode
    byte[] userMetadata = new byte[userMetaDataSize];
    byte[] data = new byte[blobSize];
    BlobProperties properties =
        new BlobProperties(blobSize, "serviceid1", null, null, false, -1, accountId, containerId, false, null, null,
            null);
    TestUtils.RANDOM.nextBytes(userMetadata);
    TestUtils.RANDOM.nextBytes(data);

    Port port = new Port(dataNode.getPort(), PortType.PLAINTEXT);
    ConnectedChannel channel =
        getBlockingChannelBasedOnPortType(port, dataNode.getHostname(), null, null);
    channel.connect();
    CountDownLatch latch = new CountDownLatch(1);
    DirectSender runnable = new DirectSender(channel, serverBlobIds, data, userMetadata, properties, null, latch);
    Thread threadToRun = new Thread(runnable);
    threadToRun.start();
    assertTrue("Did not put all blobs in 2 minutes", latch.await(2, TimeUnit.MINUTES));
    List<BlobId> blobIds = runnable.getBlobIds();
    for (BlobId blobId : blobIds) {
      blobIdToSizeMap.put(blobId, blobSize);
    }
  }
Send blobs to given server dataNode and update {@code blobIdToSizeMap}.
@param dataNode the target node.
@param blobSize size of blobs to send.
@param blobIdToSizeMap {@link Map} of {@link BlobId} to size of blob uploaded.
ambry-vcr/src/test/java/com/github/ambry/vcr/CloudAndStoreReplicationTest.java