@Test
  public void testFullRestoreSingleCommand() throws Exception {
    LOG.info("test full restore on a single table empty table: command-line");

    List<TableName> tables = Lists.newArrayList(table1);
    String backupId = fullTableBackup(tables);
    LOG.info("backup complete");
    assertTrue(checkSucceeded(backupId));
    // restore <backup_root_path> <backup_id> <tables> [tableMapping]
    String[] args = new String[] { BACKUP_ROOT_DIR, backupId, "-t", table1.getNameAsString(), "-m",
      table1_restore.getNameAsString() };
    // Run backup
    int ret = ToolRunner.run(conf1, new RestoreDriver(), args);

    assertTrue(ret == 0);
    Admin hba = TEST_UTIL.getAdmin();
    assertTrue(hba.tableExists(table1_restore));
    TEST_UTIL.deleteTable(table1_restore);
    hba.close();
  }
Verify that a single table is restored to a new table.
@throws Exception if doing the backup, restoring it or an operation on the tables fails
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestFullRestore.java