@Test(groups = { "integration", "live" })
public void testPut() throws IOException, InterruptedException {
String bucketName = getContainerName();
try {
Map<String, Blob> map = createMap(view, bucketName);
Blob blob = view.getBlobStore().blobBuilder("one").payload(Strings2.toInputStream("apple")).calculateMD5()
.build();
Blob old = map.put(blob.getMetadata().getName(), blob);
getOneReturnsAppleAndOldValueIsNull(map, old);
blob.setPayload(Strings2.toInputStream("bear"));
Payloads.calculateMD5(blob);
Blob apple = map.put(blob.getMetadata().getName(), blob);
getOneReturnsBearAndOldValueIsApple(map, apple);
} finally {
returnContainer(bucketName);
}
}