@Test
  public void testRestoreSnapshotWithTTLSuccess() throws Exception {
    String snapshotName = "nonExpiredTTLRestoreSnapshotTest";

    // table should exist
    assertTrue(UTIL.getAdmin().tableExists(TABLE_NAME));

    // create snapshot fo given table with specified ttl
    createSnapshotWithTTL(TABLE_NAME, snapshotName, CHORE_INTERVAL_SECS * 2);
    Admin admin = UTIL.getAdmin();

    // Disable and drop table
    admin.disableTable(TABLE_NAME);
    admin.deleteTable(TABLE_NAME);
    assertFalse(UTIL.getAdmin().tableExists(TABLE_NAME));

    // restore snapshot
    admin.restoreSnapshot(snapshotName);

    // table should be created
    assertTrue(UTIL.getAdmin().tableExists(TABLE_NAME));
  }
Setup the config for the cluster
@throws Exception on failure
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotWithTTLFromClient.java