String containerName = getScratchContainerName();
assertTrue(swift.createContainer(containerName, options));
try {
ContainerMetadata containerMetadata = swift.getContainerMetadata(containerName);
assertEquals(containerMetadata.getMetadata().size(), 3);
assertEquals(containerMetadata.getMetadata().get("key1"), "value1");
assertEquals(containerMetadata.getMetadata().get("key2"), "value2");
assertEquals(containerMetadata.getMetadata().get("key3"), "value3");
assertTrue(swift.deleteContainerMetadata(containerName, ImmutableList.<String> of("key2", "key3")));
containerMetadata = swift.getContainerMetadata(containerName);
assertEquals(containerMetadata.getMetadata().size(), 1);
assertEquals(containerMetadata.getMetadata().get("key1"), "value1");
} finally {
returnContainer(containerName);
}
}