public static void verifyReplicasCameOnline(TableName tableName, Admin admin,
    int regionReplication) throws IOException {
    List<RegionInfo> regions = admin.getRegions(tableName);
    HashSet<RegionInfo> set = new HashSet<>();
    for (RegionInfo hri : regions) {
      set.add(RegionReplicaUtil.getRegionInfoForDefaultReplica(hri));
      for (int i = 0; i < regionReplication; i++) {
        RegionInfo replica = RegionReplicaUtil.getRegionInfoForReplica(hri, i);
        if (!regions.contains(replica)) {
          Assert.fail(replica + " is not contained in the list of online regions");
        }
      }
    }
    assertEquals(getSplitKeys().length + 1, set.size());
  }
Corrupt data-manifest file
@throws IOException on unexecpted error from the FS
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java