// TODO insufficient permissions to test
  @Test(
      description = "DELETE /admin/vdc/{id}/metadata/{key}",
      dependsOnMethods = {"testSetMetadataValue"},
      enabled = false)
  public void testRemoveMetadataValue() throws Exception {
    // TODO Remove dependency on other tests; make cleanUp remove a list of metadata entries?

    Task task = metadataApi.remove(metadataKey);
    assertTaskSucceeds(task);

    assertNull(metadataApi.get(metadataKey));
  }
  // TODO insufficient permissions to test
  @Test(description = "PUT /admin/vdc/{id}/metadata", enabled = false)
  public void testSetMetadata() throws Exception {
    metadataKey = name("key-");
    metadataValue = name("value-");

    Task task = metadataApi.putAll(ImmutableMap.of(metadataKey, metadataValue));

    assertTaskSucceeds(task);

    String modified = metadataApi.get(metadataKey);
    assertEquals(modified, metadataValue);
  }
  // TODO insufficient permissions to test
  @Test(
      description = "PUT /admin/vdc/{id}/metadata/{key}",
      dependsOnMethods = {"testGetMetadataValue"},
      enabled = false)
  public void testSetMetadataValue() throws Exception {
    metadataValue = name("value-");

    Task task = metadataApi.put(metadataKey, metadataValue);
    assertTaskSucceeds(task);

    String retrievedMetadataValue = metadataApi.get(metadataKey);
    assertEquals(retrievedMetadataValue, metadataValue);
  }
  // TODO insufficient permissions to test
  @Test(
      description = "GET /admin/vdc/{id}/metadata/{key}",
      dependsOnMethods = {"testSetMetadata"},
      enabled = false)
  public void testGetMetadataValue() throws Exception {
    String retrievedMetadataValue = metadataApi.get(metadataKey);

    assertEquals(retrievedMetadataValue, metadataValue);
  }
 @AfterClass(alwaysRun = true)
 public void cleanUp() throws Exception {
   if (metadataKey != null) {
     try {
       Task task = metadataApi.remove(metadataKey);
       taskDoneEventually(task);
     } catch (VCloudDirectorException e) {
       logger.warn(e, "Error deleting metadata-value (perhaps it doesn't exist?); continuing...");
     }
   }
 }
  @Test(description = "GET /admin/vdc/{id}/metadata")
  public void testGetMetadata() throws Exception {
    Metadata metadata = metadataApi.get();

    Checks.checkMetadata(metadata);
  }