public Enumeration<Permission> elements() {
      return Collections.enumeration(perms);
    }
A security policy that grants usederbyinternals

<p>
  HCatalog tests use Security Manager to handle exits.  With Derby version 10.14.1, if a
  security manager is configured, embedded Derby requires usederbyinternals permission, and
  that is checked directly using AccessController.checkPermission.  This class will be used to
  setup a security policy to grant usederbyinternals, in tests that use NoExitSecurityManager.
</p>
hcatalog/core/src/test/java/org/apache/hive/hcatalog/DerbyPolicy.java