@Test
  public void testExportFileSystemStateWithSplitRegion() throws Exception {
    // disable compaction
    admin.compactionSwitch(false,
      admin.getRegionServers().stream().map(a -> a.getServerName()).collect(Collectors.toList()));
    // create Table
    TableName splitTableName = TableName.valueOf(testName.getMethodName());
    String splitTableSnap = "snapshot-" + testName.getMethodName();
    admin.createTable(TableDescriptorBuilder.newBuilder(splitTableName).setColumnFamilies(
      Lists.newArrayList(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build())).build());

    Path output = TEST_UTIL.getDataTestDir("output/cf");
    TEST_UTIL.getTestFileSystem().mkdirs(output);
    // Create and load a large hfile to ensure the execution time of MR job.
    HFileTestUtil.createHFile(TEST_UTIL.getConfiguration(), TEST_UTIL.getTestFileSystem(),
      new Path(output, "test_file"), FAMILY, Bytes.toBytes("q"), Bytes.toBytes("1"),
      Bytes.toBytes("9"), 9999999);
    BulkLoadHFilesTool tool = new BulkLoadHFilesTool(TEST_UTIL.getConfiguration());
    tool.run(new String[] { output.getParent().toString(), splitTableName.getNameAsString() });

    List<RegionInfo> regions = admin.getRegions(splitTableName);
    assertEquals(1, regions.size());
    tableNumFiles = regions.size();

    // split region
    admin.split(splitTableName, Bytes.toBytes("5"));
    regions = admin.getRegions(splitTableName);
    assertEquals(2, regions.size());

    // take a snapshot
    admin.snapshot(splitTableSnap, splitTableName);
    // export snapshot and verify
    Configuration tmpConf = TEST_UTIL.getConfiguration();
    // Decrease the buffer size of copier to avoid the export task finished shortly
    tmpConf.setInt("snapshot.export.buffer.size", 1);
    // Decrease the maximum files of each mapper to ensure the three files(1 hfile + 2 reference
    // files)
    // copied in different mappers concurrently.
    tmpConf.setInt("snapshot.export.default.map.group", 1);
    testExportFileSystemState(tmpConf, splitTableName, splitTableSnap, splitTableSnap,
      tableNumFiles, TEST_UTIL.getDefaultRootDirPath(), getHdfsDestinationDir(), false, false,
      getBypassRegionPredicate(), true, false);
    // delete table
    TEST_UTIL.deleteTable(splitTableName);
  }
Verify if exported snapshot and copied files matches the original one.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java