* <p/>
* Beyond it's use here it is also used as a cheap way of generating Operations to both test the OperationApi and
* the pagination system.
*/
public static Operation addItemToMetadata(ProjectApi projectApi, String projectName, String key, String value) {
Project project = projectApi.get(projectName);
assertNotNull(project);
ImmutableMap.Builder<String, String> metadataBuilder = ImmutableMap.builder();
metadataBuilder.putAll(project.getCommonInstanceMetadata().getItems());
metadataBuilder.put(key, value);
return projectApi.setCommonInstanceMetadata(projectName, metadataBuilder.build(),
project.getCommonInstanceMetadata().getFingerprint());
}