@Test
  public void testDelayedChannelPutSuccess() throws Exception {
    router = getNonBlockingRouter();
    int[] blobSizes = {0, // zero sized blob.
        chunkSize, // blob size is the same as chunk size.
        chunkSize + random.nextInt(chunkSize - 1) + 1, // over a chunk but less than 2 chunks.
        chunkSize * (2 + random.nextInt(10)), // blob size is a multiple of chunk size.
        chunkSize + (2 + random.nextInt(10)) + random.nextInt(chunkSize - 1) + 1 // multiple of a chunk and over.
    };
    for (int blobSize : blobSizes) {
      testDelayed(blobSize, false);
      testDelayed(blobSize, true);
    }
    assertSuccess();
    assertCloseCleanup();
  }
Tests put of blobs with various sizes with channels that do not have all the data at once. This also tests cases
where zero-length buffers are given out by the channel.
ambry-router/src/test/java/com/github/ambry/router/PutManagerTest.java