private static boolean contains(Iterable<FileStatus> files, Path filePath) {
    for (FileStatus status : files) {
      LOG.debug("debug in contains, 3.1: " + status.getPath() + " filePath:" + filePath);
      if (filePath.equals(status.getPath())) {
        return true;
      }
    }
    return false;
  }
Test that we correctly reload the cache, filter directories, etc.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotFileCache.java