protected static Set<String> verifySnapshot(final Configuration conf, final FileSystem fs,
    final Path rootDir, final TableName tableName, final String snapshotName,
    final boolean resetTtl, final RegionPredicate bypassregionPredicate) throws IOException {
    final Path exportedSnapshot =
      new Path(rootDir, new Path(HConstants.SNAPSHOT_DIR_NAME, snapshotName));
    final Set<String> snapshotFiles = new HashSet<>();
    final Path exportedArchive = new Path(rootDir, HConstants.HFILE_ARCHIVE_DIRECTORY);
    SnapshotReferenceUtil.visitReferencedFiles(conf, fs, exportedSnapshot,
      new SnapshotReferenceUtil.SnapshotVisitor() {
        @Override
        public void storeFile(final RegionInfo regionInfo, final String family,
          final SnapshotRegionManifest.StoreFile storeFile) throws IOException {
          if (bypassregionPredicate != null && bypassregionPredicate.evaluate(regionInfo)) {
            return;
          }

          if (!storeFile.hasReference() && !StoreFileInfo.isReference(storeFile.getName())) {
            String hfile = storeFile.getName();
            snapshotFiles.add(hfile);
            verifyNonEmptyFile(new Path(exportedArchive,
              new Path(CommonFSUtils.getTableDir(new Path("./"), tableName),
                new Path(regionInfo.getEncodedName(), new Path(family, hfile)))));
          } else {
            Pair<String, String> referredToRegionAndFile =
              StoreFileInfo.getReferredToRegionAndFile(storeFile.getName());
            String region = referredToRegionAndFile.getFirst();
            String hfile = referredToRegionAndFile.getSecond();
            snapshotFiles.add(hfile);
            verifyNonEmptyFile(new Path(exportedArchive,
              new Path(CommonFSUtils.getTableDir(new Path("./"), tableName),
                new Path(region, new Path(family, hfile)))));
          }
        }

        private void verifyNonEmptyFile(final Path path) throws IOException {
          assertTrue(path + " should exists", fs.exists(path));
          assertTrue(path + " should not be empty", fs.getFileStatus(path).getLen() > 0);
        }
      });

    // Verify Snapshot description
    SnapshotDescription desc = SnapshotDescriptionUtils.readSnapshotInfo(fs, exportedSnapshot);
    assertTrue(desc.getName().equals(snapshotName));
    assertTrue(desc.getTable().equals(tableName.getNameAsString()));
    if (resetTtl) {
      assertEquals(HConstants.DEFAULT_SNAPSHOT_TTL, desc.getTtl());
    }
    return snapshotFiles;
  }
Creates destination directory, runs ExportSnapshot() tool, and runs some verifications.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java