@Override
    public List<String> getGroups(String user) throws IOException {
      if (user.equals("globalGroupUser1")) {
        return Arrays.asList(new String[] { "group_admin" });
      } else if (user.equals("globalGroupUser2")) {
        return Arrays.asList(new String[] { "group_admin", "group_create" });
      } else if (user.equals("nsGroupUser1")) {
        return Arrays.asList(new String[] { "ns_group1" });
      } else if (user.equals("nsGroupUser2")) {
        return Arrays.asList(new String[] { "ns_group2" });
      } else if (user.equals("tableGroupUser1")) {
        return Arrays.asList(new String[] { "table_group1" });
      } else if (user.equals("tableGroupUser2")) {
        return Arrays.asList(new String[] { "table_group2" });
      } else {
        return super.getGroups(user);
      }
    }
List all user permissions match the given regular expression for namespace and verify each of
them.
@param namespaceRegexWithoutPrefix the regualar expression for namespace, without
                                   NAMESPACE_PREFIX
@param expectedAmount              the expected amount of user permissions returned
@param expectedNamespace           the expected namespace of each user permission returned
@throws HBaseException in the case of any HBase exception when accessing hbase:acl table
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java