getApi().copyObject(containerName, sourceKey, destinationContainer, destinationKey,
overrideMetadataWith(metadata));
validateContent(destinationContainer, destinationKey);
ObjectMetadata objectMeta = getApi().headObject(destinationContainer, destinationKey);
assertEquals(objectMeta.getUserMetadata(), metadata);
} finally {
returnContainer(containerName);
returnContainer(destinationContainer);
}