// Arrange
Configuration config = createConfiguration();
BlobContract service = BlobService.create(config);
// Act
ListContainersResult results = service
.listContainers(new ListContainersOptions().setPrefix(
testContainersPrefix).setMaxResults(3));
// Assert
assertNotNull(results);
assertEquals(3, results.getContainers().size());
assertNotNull(results.getNextMarker());
assertEquals(3, results.getMaxResults());
// Act
ListContainersResult results2 = service
.listContainers(new ListContainersOptions().setPrefix(
testContainersPrefix)
.setMarker(results.getNextMarker()));
// Assert
assertNotNull(results2);
assertNotNull(results2.getNextMarker());
assertEquals(0, results2.getMaxResults());
// Act
ListContainersResult results3 = service
.listContainers(new ListContainersOptions()
.setPrefix(testContainersPrefix));
// Assert
assertEquals(results.getContainers().size()
+ results2.getContainers().size(), results3.getContainers()
.size());
}