Role newRole;
try {
newRole = api.getRoleApi().createWithPolicy(roleName, RoleApiLiveTest.assumeRolePolicy);
getAnonymousLogger().info("created role: " + newRole);
api(roleName).create("S3Access", s3Policy);
Policy newPolicy = api(roleName).get("S3Access");
getAnonymousLogger().info("created policy: " + newPolicy);
checkPolicy(newPolicy);
assertEquals(newPolicy.getDocument(), s3Policy);
api(roleName).delete("S3Access");
assertNull(api(roleName).get("S3Access"));
} finally {
api(roleName).delete("S3Access");
api.getRoleApi().delete(roleName);