List<Pair<String, String>> doCopyDatasetTestAndVerify(List<Dataset> datasets, String contentType, String ownerId,
      int contentSize)
      throws Exception {
    List<Pair<String, String>> datasetVersions = new ArrayList<>();
    for (Dataset dataset : datasets) {
      Dataset.VersionSchema versionSchema = dataset.getVersionSchema();
      if (SEMANTIC_LONG.equals(versionSchema)) {
        long ttl = TTL_SECS;
        String sourceVersion = generateDatasetVersion(dataset);
        String targetVersion = generateDatasetVersion(dataset);
        HttpHeaders headers = new DefaultHttpHeaders();
        headers.add(RestUtils.Headers.DATASET_VERSION_QUERY_ENABLED, true);
        String accountName = dataset.getAccountName();
        String containerName = dataset.getContainerName();
        String datasetName = dataset.getDatasetName();
        setAmbryHeadersForPut(headers, ttl, false, accountName, contentType, ownerId, null, null);
        ByteBuffer content = ByteBuffer.wrap(TestUtils.getRandomBytes(contentSize));
        putDatasetVersionAndVerify(dataset, sourceVersion, headers, content, contentSize, ttl);

        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);

        headers = new DefaultHttpHeaders();
        headers.add(RestUtils.Headers.DATASET_VERSION_QUERY_ENABLED, true);
        FullHttpRequest httpRequest = buildRequest(HttpMethod.PUT,
            buildUriForDatasetVersionForCopy(accountName, containerName, datasetName, sourceVersion, targetVersion),
            headers, null);
        NettyClient.ResponseParts responseParts = nettyClient.sendRequest(httpRequest, null, null).get();
        HttpResponse response = getHttpResponse(responseParts);
        assertEquals("Unexpected response status", HttpResponseStatus.OK, response.status());

        HttpHeaders getHeaders = new DefaultHttpHeaders();
        getHeaders.add(RestUtils.Headers.DATASET_VERSION_QUERY_ENABLED, true);

        getDatasetVersionInfoAndVerify(accountName, containerName, dataset.getDatasetName(), targetVersion, getHeaders, ttl,
            expectedGetHeaders);
        datasetVersions.add(new Pair<>(dataset.getDatasetName(), targetVersion));
      }
    }
    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