service.createBlobBlock(container, blob, "124",
new ByteArrayInputStream(new byte[512]));
service.createBlobBlock(container, blob, "125",
new ByteArrayInputStream(new byte[195]));
ListBlobBlocksResult result = service.listBlobBlocks(container, blob,
new ListBlobBlocksOptions().setCommittedList(true)
.setUncommittedList(true));
// Assert
assertNotNull(result);
assertNotNull(result.getLastModified());
assertNotNull(result.getEtag());
assertEquals(0, result.getContentLength());
assertNotNull(result.getCommittedBlocks());
assertEquals(0, result.getCommittedBlocks().size());
assertNotNull(result.getUncommittedBlocks());
assertEquals(3, result.getUncommittedBlocks().size());
assertEquals("123", result.getUncommittedBlocks().get(0).getBlockId());
assertEquals(256, result.getUncommittedBlocks().get(0).getBlockLength());
assertEquals("124", result.getUncommittedBlocks().get(1).getBlockId());
assertEquals(512, result.getUncommittedBlocks().get(1).getBlockLength());
assertEquals("125", result.getUncommittedBlocks().get(2).getBlockId());
assertEquals(195, result.getUncommittedBlocks().get(2).getBlockLength());
}