static void testSnapshotWithRefsExportFileSystemState(FileSystem fs,
    SnapshotMock.SnapshotBuilder builder, HBaseCommonTestingUtil testUtil, Path testDir)
    throws Exception {
    Path[] r1Files = builder.addRegion();
    Path[] r2Files = builder.addRegion();
    builder.commit();
    // remove references, only keep data files
    Set<String> dataFiles = new HashSet<>();
    for (Path[] files : new Path[][] { r1Files, r2Files }) {
      for (Path file : files) {
        if (StoreFileInfo.isReference(file.getName())) {
          Pair<String, String> referredToRegionAndFile =
            StoreFileInfo.getReferredToRegionAndFile(file.getName());
          dataFiles.add(referredToRegionAndFile.getSecond());
        } else {
          dataFiles.add(file.getName());
        }
      }
    }
    int snapshotFilesCount = dataFiles.size();
    String snapshotName = builder.getSnapshotDescription().getName();
    TableName tableName = builder.getTableDescriptor().getTableName();
    TestExportSnapshot.testExportFileSystemState(testUtil.getConfiguration(), tableName,
      snapshotName, snapshotName, snapshotFilesCount, testDir,
      getDestinationDir(fs, testUtil, testDir), false, false, null, true, false);
  }
Generates a couple of regions for the specified SnapshotMock, and then it will run the export
and verification.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotV1NoCluster.java