public static void createSnapshotAndValidate(Admin admin, TableName tableName, String familyName,
    String snapshotNameString, Path rootDir, FileSystem fs, boolean onlineSnapshot)
    throws Exception {
    ArrayList<byte[]> nonEmptyFamilyNames = new ArrayList<>(1);
    nonEmptyFamilyNames.add(Bytes.toBytes(familyName));
    createSnapshotAndValidate(admin, tableName, nonEmptyFamilyNames, /* emptyFamilyNames= */ null,
      snapshotNameString, rootDir, fs, onlineSnapshot);
  }
Take a snapshot of the specified table and verify that the given family is not empty. Note that
this will leave the table disabled in the case of an offline snapshot.
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java