private String containerPrefix = BaseBlobStoreIntegrationTest.CONTAINER_PREFIX;
@Test
public void testListContainers() throws Exception {
ContainerList response = connection.list();
URI rootUrl = response.getUrl();
String name = "/";
validateContainerList(response, rootUrl, name);
long initialContainerCount = response.size();
assertTrue(initialContainerCount >= 0);
// Create test containers
for (String container : new String[] { containerPrefix + ".testListOwnedContainers1",
containerPrefix + ".testListOwnedContainers2" }) {
URI containerURI = connection.createContainer(container);
connection.putMetadataItem(containerURI, "name", container);
response = connection.list(containerURI);
validateContainerList(response, rootUrl, container);
assertEquals(response.getMetadataItems().get("name"),
URI.create(containerURI.toASCIIString() + "/metadata/name"));
validateMetadataItemNameEquals(containerURI, container);
connection.deleteContainer(containerURI);