@Test
  public void testCreateBackupOfServer() throws InterruptedException {
    if (clientOption.isPresent()) {
      backupImageId =
          clientOption
              .get()
              .createBackupOfServer(
                  testServerId,
                  "jclouds-test-backup",
                  BackupType.DAILY,
                  0,
                  CreateBackupOfServerOptions.Builder.metadata(
                      ImmutableMap.of("test", "metadata")));

      assertNotNull(backupImageId);

      // If we don't have extended task status, we'll have to wait here!
      if (extensionClient.getExtensionByAlias("OS-EXT-STS") == null) {
        Thread.sleep(30000);
      }

      blockUntilServerInState(testServerId, serverClient, Server.Status.ACTIVE);

      Image backupImage = imageClient.getImage(backupImageId);
      assertEquals(backupImage.getId(), backupImageId);
    }
  }
 @AfterGroups(groups = "live", alwaysRun = true)
 @Override
 protected void tearDown() {
   if (clientOption.isPresent()) {
     if (testServerId != null) {
       assertTrue(novaContext.getApi().getServerClientForZone(zone).deleteServer(testServerId));
     }
     if (backupImageId != null) {
       imageClient.deleteImage(backupImageId);
     }
   }
   super.tearDown();
 }