StorageObject trickyObject = service.putObject(bucketName,
new StorageObject(trickyKey, "Some test data"));
assertEquals("Tricky key name mistmatch", trickyKey, trickyObject.getKey());
// Make sure the tricky named object really exists with its full name.
StorageObject[] objects = service.listObjects(bucketName);
boolean trickyNamedObjectExists = false;
for (int i = 0; !trickyNamedObjectExists && i < objects.length; i++) {
if (trickyKey.equals(objects[i].getKey())) {
trickyNamedObjectExists = true;
}