List<Pair<String, String>> doDatasetVersionPutGetTest(Account account, Container container, List<Dataset> datasets,
      String contentType, String ownerId) throws Exception {
    String accountName = account.getName();
    String containerName = container.getName();
    List<Pair<String, String>> datasetVersions = new ArrayList<>();
    for (Dataset dataset : datasets) {
      for (long ttl : new long[]{-1, TTL_SECS}) {
        //Test put dataset version
        HttpHeaders headers = new DefaultHttpHeaders();
        setAmbryHeadersForPut(headers, ttl, false, accountName, contentType, ownerId, null, null);
        headers.add(RestUtils.Headers.DATASET_VERSION_QUERY_ENABLED, true);
        int contentSize = 100;
        ByteBuffer content = ByteBuffer.wrap(TestUtils.getRandomBytes(contentSize));
        String version = generateDatasetVersion(dataset);
        String blobId = putDatasetVersionAndVerify(dataset, version, headers, content, contentSize, ttl);

        // This is the blob id for the given blob name, we should be able to do all get operations on this blob id.
        HttpHeaders expectedGetHeaders = new DefaultHttpHeaders().add(headers);
        expectedGetHeaders.add(RestUtils.Headers.BLOB_SIZE, content.capacity());
        expectedGetHeaders.add(RestUtils.Headers.LIFE_VERSION, "0");
        expectedGetHeaders.add(TARGET_ACCOUNT_NAME, accountName);
        expectedGetHeaders.add(RestUtils.Headers.TARGET_CONTAINER_NAME, containerName);
        doVariousGetAndVerify(blobId, expectedGetHeaders, false, content, 100, accountName, containerName, null,
            container);

        //Test get dataset version
        HttpHeaders getHeaders = new DefaultHttpHeaders();
        getHeaders.add(RestUtils.Headers.DATASET_VERSION_QUERY_ENABLED, true);
        getDatasetVersionAndVerify(dataset, version, getHeaders, contentSize, ttl, expectedGetHeaders, content);
        getDatasetVersionInfoAndVerify(accountName, containerName, dataset.getDatasetName(), version, getHeaders, ttl,
            expectedGetHeaders);

        //add all versions when successfully get it.
        datasetVersions.add(new Pair<>(dataset.getDatasetName(), version));
      }
    }
    return datasetVersions;
  }
Verify Named blob List operation.
@param accountName The account name.
@param containerName The container name
@param ownerId The owner id
@param prefix The prefix of blob name.
@param numberOfBlobs The expected number of named blobs returned by list operation.
@throws Exception
ambry-frontend/src/integration-test/java/com/github/ambry/frontend/FrontendIntegrationTestBase.java