private void doPut() throws Exception {
    String contentType = enableCompression ? "text/plain" : "application/octet-stream";
    blobProperties = new BlobProperties(-1, "serviceId", "memberId", contentType, false, Utils.Infinite_Time,
        Utils.getRandomShort(random), Utils.getRandomShort(random), testEncryption, null, null, null);
    userMetadata = new byte[10];
    random.nextBytes(userMetadata);
    if (enableCompression) {
      StringBuilder sb = new StringBuilder();
      String temp = "abcdefg";
      while (sb.length() < blobSize) {
        int len = temp.length() < blobSize - sb.length() ? temp.length() : blobSize - sb.length();
        sb.append("abcdefg".substring(0, len));
      }
      // This is highly compressible content
      putContent = sb.toString().getBytes(StandardCharsets.US_ASCII);
    } else {
      putContent = new byte[blobSize];
      random.nextBytes(putContent);
    }
    ReadableStreamChannel putChannel = new ByteBufferReadableStreamChannel(ByteBuffer.wrap(putContent));
    // TODO fix null quota charge event listener
    blobIdStr = router.putBlob(blobProperties, userMetadata, putChannel, new PutBlobOptionsBuilder().build()).get();
    blobId = RouterUtils.getBlobIdFromString(blobIdStr, mockClusterMap);
  }
Generates random content, and does a single put of the content, and saves the blob id string returned. The tests
use this blob id string to perform the gets. Tests asserting success compare the contents of the returned blob
with the content that is generated within this method.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/GetBlobOperationTest.java