@Test(expected = SnapshotDoesNotExistException.class)
  public void testCloneNonExistentSnapshot() throws IOException, InterruptedException {
    String snapshotName = "random-snapshot-" + EnvironmentEdgeManager.currentTime();
    TableName tableName = TableName.valueOf("random-table-" + EnvironmentEdgeManager.currentTime());
    admin.cloneSnapshot(snapshotName, tableName);
  }
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