files.add(content, "/file" + i);
}
byte[] tarGz = ByteStreams.toByteArray(files.as(TarGzExporter.class).exportAsInputStream());
MockWebServer server = mockOpenStackServer();
server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(201).setBody("{\"Number Files Created\": 10, \"Errors\": []}")));
try {
SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
ExtractArchiveResponse response = api.bulkApiInRegion("DFW").extractArchive("myContainer",
newByteArrayPayload(tarGz), "tar.gz");