.addHeader(OBJECT_METADATA_PREFIX + "Apiname", "swift")
.addHeader(OBJECT_METADATA_PREFIX + "Apiversion", "v1.1")));
try {
SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
SwiftObject object = api.getObjectApi("DFW", "myContainer").getWithoutBody("myObject");
assertEquals(object.getName(), "myObject");
assertEquals(object.getETag(), "8a964ee2a5e88be344f36c22562a6486");
// Check MD5 is parsed from the ETag header.
assertEquals(base16().lowerCase().decode(object.getETag()),
object.getPayload().getContentMetadata().getContentMD5AsHashCode().asBytes());
assertEquals(object.getLastModified(), dates.rfc822DateParse("Fri, 12 Jun 2010 13:40:18 GMT"));
for (Entry<String, String> entry : object.getMetadata().entrySet()) {
assertEquals(object.getMetadata().get(entry.getKey().toLowerCase()), entry.getValue());
}
assertEquals(object.getPayload().getContentMetadata().getContentType(), "text/plain; charset=UTF-8");
assertEquals(toStringAndClose(object.getPayload().openStream()), "");
assertEquals(server.getRequestCount(), 2);
assertAuthentication(server);
assertRequest(server.takeRequest(), "HEAD", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer/myObject");
} finally {