static void cleanupPartition(AzureCloudConfig azureCloudConfig, PartitionId partitionId) {
    CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder().endpoint(azureCloudConfig.cosmosEndpoint)
        .key(azureCloudConfig.cosmosKey)
        .consistencyLevel(ConsistencyLevel.SESSION)
        .buildAsyncClient();
    CosmosAsyncContainer cosmosAsyncContainer = cosmosAsyncClient.getDatabase(azureCloudConfig.cosmosDatabase)
        .getContainer(azureCloudConfig.cosmosCollection);

    List<CloudBlobMetadata> cloudBlobMetadataList = new ArrayList<>();

    // Query items
    SqlQuerySpec sqlQuerySpec =
        new SqlQuerySpec("select * from c where c.partitionId=\"" + partitionId.toPathString() + "\"");
    CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequestOptions();
    cosmosQueryRequestOptions.setPartitionKey(new PartitionKey(partitionId.toPathString()));

    cosmosAsyncContainer.queryItems(sqlQuerySpec, cosmosQueryRequestOptions, CloudBlobMetadata.class)
        .byPage()
        .flatMapSequential(feedResponse -> {
          cloudBlobMetadataList.addAll(feedResponse.getResults());
          return Flux.empty();
        })
        .blockLast();

    // Delete items
    cloudBlobMetadataList.forEach(cloudBlobMetadata -> cosmosAsyncContainer.deleteItem(cloudBlobMetadata.getId(),
        new PartitionKey(partitionId.toPathString())).block());
  }
Cleanup the specified partition in azure by deleting all the blobs of the partition.
@param azureCloudConfig Properties containing the credentials needed for connection to azure.
@param partitionId partition to be deleted.
ambry-cloud/src/test/java/com/github/ambry/cloud/CloudTestUtil.java