URI.create("http://localhost")).build());
}
@Test
public void testExtendedPropertiesBind() {
S3Object object = injector.getInstance(S3Object.Factory.class).create(null);
Payload payload = Payloads.newStringPayload("");
payload.getContentMetadata().setContentLength(5368709120l);
object.setPayload(payload);
object.getMetadata().setKey("foo");
object.getMetadata().setCacheControl("no-cache");
object.getMetadata().setUserMetadata(ImmutableMap.of("foo", "bar"));
HttpRequest request = HttpRequest.builder().method("PUT").endpoint("http://localhost").build();
BindS3ObjectMetadataToRequest binder = injector.getInstance(BindS3ObjectMetadataToRequest.class);
assertEquals(binder.bindToRequest(request, object), HttpRequest.builder().method("PUT").endpoint(