@Test
  public void testRestoreSnapshot() throws IOException {
    verifyRowCount(UTIL, tableName, snapshot1Rows);

    // Restore from snapshot-0
    admin.disableTable(tableName);
    admin.restoreSnapshot(snapshotName0);
    logFSTree();
    admin.enableTable(tableName);
    LOG.info("=== after restore with 500 row snapshot");
    logFSTree();
    verifyRowCount(UTIL, tableName, snapshot0Rows);

    // Restore from snapshot-1
    admin.disableTable(tableName);
    admin.restoreSnapshot(snapshotName1);
    admin.enableTable(tableName);
    verifyRowCount(UTIL, tableName, snapshot1Rows);
  }
Initialize the tests with a table filled with some data and two snapshots (snapshotName0,
snapshotName1) of different states. The tableName, snapshotNames and the number of rows in the
snapshot are initialized.
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestRestoreFlushSnapshotFromClient.java