@Test
  public void testRestoreSnapshotOfCloned() throws IOException, InterruptedException {
    TableName clonedTableName =
      TableName.valueOf("clonedtb-" + EnvironmentEdgeManager.currentTime());
    admin.cloneSnapshot(snapshotName0, clonedTableName);
    verifyRowCount(UTIL, clonedTableName, snapshot0Rows);
    admin.snapshot(snapshotName2, clonedTableName, SnapshotType.FLUSH);
    UTIL.deleteTable(clonedTableName);

    admin.cloneSnapshot(snapshotName2, clonedTableName);
    verifyRowCount(UTIL, clonedTableName, snapshot0Rows);
    UTIL.deleteTable(clonedTableName);
  }
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