private SnapshotMock.SnapshotBuilder createAndTestSnapshotV1(final SnapshotFileCache cache,
    final String name, final boolean tmp, final boolean removeOnExit, boolean setFolderTime)
    throws IOException {
    SnapshotMock snapshotMock = new SnapshotMock(conf, fs, rootDir);
    SnapshotMock.SnapshotBuilder builder = snapshotMock.createSnapshotV1(name, name);
    createAndTestSnapshot(cache, builder, tmp, removeOnExit, setFolderTime);
    return builder;
  }
Test that we correctly reload the cache, filter directories, etc.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotFileCache.java