@Test
public void testHasPermissionForOrganizationWithIndirectlyGrantedFunction() throws Exception {

  String content = "" +
          "function.group1.members = group2\n" +
          "function.group2.members = function\n" +
          "subject.1.name = subject\n" +
          "organization.1.name = organization\n" +
          "subject.1.permission.1 = group1" +
          "";
  setup(content);
  assertTrue(accessController.hasPermission(createCredentials(1), createFunctionIdentifier("function"), createOrganizationIdentifier(1)));
  assertTrue(accessController.hasPermission(createCredentials(1), () -> "function", createOrganizationIdentifier(1)));
}