assertEquals(request.getFilters().size(), 0);
}
public void testSignPutBlob() throws ArrayIndexOutOfBoundsException, SecurityException, IllegalArgumentException,
NoSuchMethodException, IOException {
HashCode hashCode = HashCode.fromBytes(new byte[16]);
Blob blob = blobFactory.create(null);
blob.getMetadata().setName("name");
blob.setPayload("");
blob.getPayload().getContentMetadata().setContentLength(2l);
blob.getPayload().getContentMetadata().setContentMD5(hashCode.asBytes());
blob.getPayload().getContentMetadata().setContentType("text/plain");
blob.getPayload().getContentMetadata().setExpires(new Date(1000));
HttpRequest request = signer.signPutBlob("container", blob);
assertRequestLineEquals(request,
"POST https://accesspoint.atmosonline.com/rest/namespace/container/name HTTP/1.1");
assertNonPayloadHeadersEqual(
request,
"Accept: */*\n" +
"Date: Thu, 05 Jun 2008 16:38:19 GMT\n" +
"Expect: 100-continue\n" +
"x-emc-signature: OlAHsoIDCsO5YmqjRxOIM5sp3r0=\n" +
"x-emc-uid: identity\n" +
"x-emc-wschecksum: MD5/0/00000000000000000000000000000000\n");
assertContentHeadersEqual(request, "text/plain", null, null, null, 2L, hashCode.asBytes(), new Date(1000));
assertEquals(request.getFilters().size(), 0);
}