private void createSnapshotWithTTL(TableName tableName, final String snapshotName,
    final int snapshotTTL) throws IOException {
    Admin admin = UTIL.getAdmin();

    // make sure we don't fail on listing snapshots
    SnapshotTestingUtils.assertNoSnapshots(admin);

    // put some stuff in the table
    Table table = UTIL.getConnection().getTable(tableName);
    UTIL.loadTable(table, TEST_FAM);

    Map<String, Object> props = new HashMap<>();
    props.put(TTL_KEY, snapshotTTL);

    // take a snapshot of the table
    SnapshotTestingUtils.snapshot(UTIL.getAdmin(), snapshotName, tableName, SnapshotType.FLUSH, 3,
      props);
    LOG.debug("Snapshot completed.");

    // make sure we have the snapshot with expectd TTL
    List<SnapshotDescription> snapshots =
      SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshotName, tableName);
    assertEquals(1, snapshots.size());
    assertEquals(snapshotTTL, snapshots.get(0).getTtl());
  }
Setup the config for the cluster
@throws Exception on failure
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotWithTTLFromClient.java