public void testExtractArchive() throws Exception {
for (String regionId : regions) {
Payload payload = new ByteSourcePayload(ByteSource.wrap(tarGz));
ExtractArchiveResponse extractResponse = api.getBulkApi(regionId)
.extractArchive(containerName, payload, "tar.gz");
assertEquals(extractResponse.getCreated(), OBJECT_COUNT);
assertTrue(extractResponse.getErrors().isEmpty());
assertEquals(api.getContainerApi(regionId).get(containerName).getObjectCount(), OBJECT_COUNT);
// repeat the command
extractResponse = api.getBulkApi(regionId).extractArchive(containerName, payload, "tar.gz");
assertEquals(extractResponse.getCreated(), OBJECT_COUNT);
assertTrue(extractResponse.getErrors().isEmpty());
}
}