@Before
  public void setup() throws Exception {
    this.admin = UTIL.getAdmin();

    long tid = EnvironmentEdgeManager.currentTime();
    tableName = TableName.valueOf("testtb-" + tid);
    snapshotName0 = "snaptb0-" + tid;
    snapshotName1 = "snaptb1-" + tid;
    snapshotName2 = "snaptb2-" + tid;

    // create Table and disable it
    createTable();
    SnapshotTestingUtils.loadData(UTIL, tableName, 500, FAMILY);
    Table table = UTIL.getConnection().getTable(tableName);
    snapshot0Rows = countRows(table);
    LOG.info("=== before snapshot with 500 rows");
    logFSTree();

    // take a snapshot
    admin.snapshot(snapshotName0, tableName, SnapshotType.FLUSH);

    LOG.info("=== after snapshot with 500 rows");
    logFSTree();

    // insert more data
    SnapshotTestingUtils.loadData(UTIL, tableName, 500, FAMILY);
    snapshot1Rows = countRows(table);
    LOG.info("=== before snapshot with 1000 rows");
    logFSTree();

    // take a snapshot of the updated table
    admin.snapshot(snapshotName1, tableName, SnapshotType.FLUSH);
    LOG.info("=== after snapshot with 1000 rows");
    logFSTree();
    table.close();
  }
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