@Test
public void testPutWithReducedRedundancy() {
Injector injector = createInjector(Functions.forMap(ImmutableMap.<HttpRequest, HttpResponse>of()), createModule(), setupProperties());
Blob blob = injector.getInstance(BlobBuilder.class).name("test").payload("content").build();
BlobToObject blobToObject = injector.getInstance(BlobToObject.class);
AWSS3Client client = requestsSendResponses(bucketLocationRequest, bucketLocationResponse,
HttpRequest.builder()
.method("PUT")
.endpoint("https://test.s3-eu-west-1.amazonaws.com/test")
.addHeader("Expect", "100-continue")
.addHeader("x-amz-storage-class", "REDUCED_REDUNDANCY")
.addHeader("Host", "test.s3-eu-west-1.amazonaws.com")
.addHeader("Date", CONSTANT_DATE)
.addHeader("Authorization", "AWS identity:1mJrW85/mqZpYTFIK5Ebtt2MM6E=")
.payload("content").build(),
HttpResponse.builder()
.statusCode(200)
.addHeader("x-amz-id-2", "w0rL+9fALQiCOToesVQefs8WalIgn+ZhMD7hHMKYud/xv7MyKkAWQOtFNEfK97Ri")
.addHeader("x-amz-request-id", "7A84C3CD4437A4C0")
.addHeader("Date", CONSTANT_DATE)
.addHeader("ETag", "437b930db84b8079c2dd804a71936b5f")
.addHeader("Server", "AmazonS3").build()
);
client.putObject("test", blobToObject.apply(blob),
storageClass(StorageClass.REDUCED_REDUNDANCY));
}