static void canUserScanSnapshot(HBaseTestingUtil util, User user, String snapshot,
    int expectedRowCount) throws IOException, InterruptedException {
    PrivilegedExceptionAction<Void> action =
      getScanSnapshotAction(util.getConfiguration(), snapshot, expectedRowCount);
    user.runAs(action);
  }
Check if user is able to read expected rows from the specific snapshot
@param user             the specific user
@param snapshot         the snapshot to be scanned
@param expectedRowCount expected row count read from snapshot, -1 if expects
                        AccessControlException
@throws IOException          user scan snapshot error
@throws InterruptedException user scan snapshot error
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestHDFSAclHelper.java