@Test
  public void testDatasetBuilder() {
    for (int i = 0; i < DATASET_COUNT; i++) {
      // build a dataset with arguments supplied
      Dataset datasetFromBuilder = buildDatasetWithOtherFields(
          new DatasetBuilder(refAccountName, refContainers.get(0).getName(), refDatasetNames.get(i))
              .setVersionSchema(refDatasetVersionSchemas.get(i))
              .setRetentionPolicy(refDatasetRetentionPolicy.get(i))
              .setRetentionTimeInSeconds(refDatasetRetentionTimeInSeconds.get(i))
              .setRetentionCount(refDatasetRetentionCounts.get(i))
              .setUserTags(refDatasetUserTags.get(i)), refDatasets.get(i));
      assertDataset(datasetFromBuilder, i);
      // build a dataset from existing container
      Dataset anotherDatasetFromBuilder = new DatasetBuilder(datasetFromBuilder).build();
      assertDataset(anotherDatasetFromBuilder, i);
    }
  }
Tests building a {@link Container} using {@link ContainerBuilder}.
ambry-api/src/test/java/com/github/ambry/account/AccountContainerTest.java