@Test
  public void basicCloudRecoveryTest() throws Exception {
    // Create blobs and upload to cloud destination.
    Map<BlobId, Integer> blobIdToSizeMap = new HashMap<>();
    for (BlobId blobId : cloudBlobIds) {
      int blobSize = Utils.getRandomShort(TestUtils.RANDOM);
      PutMessageFormatInputStream putMessageFormatInputStream =
          ServerTestUtil.getPutMessageInputStreamForBlob(blobId, blobSize, blobIdToSizeMap, accountId, containerId);
      long time = System.currentTimeMillis();
      CloudBlobMetadata cloudBlobMetadata =
          new CloudBlobMetadata(blobId, time, Utils.Infinite_Time, putMessageFormatInputStream.getSize(),
              CloudBlobMetadata.EncryptionOrigin.NONE);
      latchBasedInMemoryCloudDestination.uploadBlob(blobId, putMessageFormatInputStream.getSize(), cloudBlobMetadata,
          putMessageFormatInputStream);
    }

    // Create blobs and upload to one of the server nodes.
    sendBlobToDataNode(partitionLeaderRecoveryNode, Utils.getRandomShort(TestUtils.RANDOM), blobIdToSizeMap);

    // Waiting for download attempt
    assertTrue("Did not recover all blobs in 1 minute",
        latchBasedInMemoryCloudDestination.awaitDownload(1, TimeUnit.MINUTES));

    // Waiting for replication to complete
    Thread.sleep(10000);

    // Test cloud to store and store to store replication by sending get request to server nodes.
    testGetOnServerNodes(blobIdToSizeMap);
  }
Test replication from vcr to server nodes, and from server to server nodes. Creates one vcr node and two server nodes.
Uploads data to vcr node and verifies that they have been replicated.
Uploads data to one of the server nodes and verifies that they have been replicated.
@throws Exception If an exception happens.
ambry-vcr/src/test/java/com/github/ambry/vcr/CloudAndStoreReplicationTest.java