@Test
  public void testOptionsSuccess() throws Exception {
    ThrowingConsumer<RequestAndResult> runTest = requestAndResult -> {
      requestAndResultsList.clear();
      requestAndResultsList.add(requestAndResult);
      mockClusterMap.clearLastNRequestedPartitionClasses();
      submitPutsAndAssertSuccess(true);
    };
    runTest.accept(new RequestAndResult(chunkSize, null,
        new PutBlobOptionsBuilder().chunkUpload(true).maxUploadSize(chunkSize).build(), null));
    runTest.accept(new RequestAndResult(chunkSize - 1, null,
        new PutBlobOptionsBuilder().chunkUpload(true).maxUploadSize(chunkSize - 1).build(), null));
    runTest.accept(
        new RequestAndResult(chunkSize + 1, null, new PutBlobOptionsBuilder().maxUploadSize(2 * chunkSize - 1).build(),
            null));
    runTest.accept(new RequestAndResult(0, null, new PutBlobOptionsBuilder().maxUploadSize(0).build(), null));
    Assert.assertEquals(0, metrics.metadataChunkCreationCount.getCount());
  }
Test success cases with various {@link PutBlobOptions} set.
ambry-router/src/test/java/com/github/ambry/router/PutManagerTest.java