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);
blob.getPayload().getContentMetadata().setContentType("text/plain");
blob.getPayload().getContentMetadata().setExpires(new Date(1000));
HttpRequest request = signer.signPutBlob("container", blob);
assertRequestLineEquals(request, "PUT https://identity.blob.core.windows.net/container/name HTTP/1.1");
assertNonPayloadHeadersEqual(
request,
"Authorization: SharedKeyLite identity:V0gyrdMZzwQrCvxEfq6eBe8PL233yJ91+aNcISEzjfE=\n" +
"Date: Thu, 05 Jun 2008 16:38:19 GMT\n" +
"Expect: 100-continue\n" +
"x-ms-blob-type: BlockBlob\n" +
"x-ms-version: 2012-02-12\n");
assertContentHeadersEqual(request, "text/plain", null, null, null, 2L, hashCode.asBytes(), new Date(1000));
assertEquals(request.getFilters().size(), 0);
}