private SnapshotBuilder createSnapshot(final String snapshotName, final String tableName,
      final int numRegions, final int version) throws IOException {
      TableDescriptor htd = createHtd(tableName);
      RegionData[] regions = createTable(htd, numRegions);

      SnapshotProtos.SnapshotDescription desc = SnapshotProtos.SnapshotDescription.newBuilder()
        .setTable(htd.getTableName().getNameAsString()).setName(snapshotName).setVersion(version)
        .build();

      Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(desc, rootDir, conf);
      FileSystem workingFs = workingDir.getFileSystem(conf);
      SnapshotDescriptionUtils.writeSnapshotInfo(desc, workingDir, workingFs);
      return new SnapshotBuilder(conf, fs, rootDir, htd, desc, regions);
    }
Corrupt data-manifest file
@throws IOException on unexecpted error from the FS
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java