private ListMultimap<String, UserPermission> createPermissions() {
    ListMultimap<String, UserPermission> permissions = ArrayListMultimap.create();
    permissions.put("george", new UserPermission("george",
      Permission.newBuilder(TEST_TABLE).withActions(Permission.Action.READ).build()));
    permissions.put("george", new UserPermission("george", Permission.newBuilder(TEST_TABLE)
      .withFamily(TEST_FAMILY).withActions(Permission.Action.WRITE).build()));
    permissions.put("george", new UserPermission("george",
      Permission.newBuilder(TEST_TABLE2).withActions(Permission.Action.READ).build()));
    permissions.put("hubert", new UserPermission("hubert", Permission.newBuilder(TEST_TABLE2)
      .withActions(Permission.Action.READ, Permission.Action.WRITE).build()));
    permissions.put("bruce", new UserPermission("bruce",
      Permission.newBuilder(TEST_NAMESPACE).withActions(Permission.Action.READ).build()));
    return permissions;
  }
The PermissionStorage.addUserPermission may throw exception before closing the table.
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestTablePermissions.java