private SnapshotDescription createSnapshotWithTtl(final String snapshotName, final long ttl)
    throws IOException {
    SnapshotTestingUtils.SnapshotMock snapshotMock =
      new SnapshotTestingUtils.SnapshotMock(UTIL.getConfiguration(), fs, rootDir);
    SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder =
      snapshotMock.createSnapshotV2(snapshotName, "test", 0, ttl);
    builder.commit();
    return builder.getSnapshotDescription();
  }
Make sure the {@link HFileCleaner HFileCleaners} run at least once
hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java