@Test
public void testGetAvailableOrganizationsOmitsInaccessibleParent() throws Exception {

  String content = "" +
          "subject.1.name = subject\n" +
          "organization.1.name = organization1\n" +
          "organization.2.name = organization2\n" +
          "organization.2.type = group\n" +
          "organization.2.members = 1\n" +
          "organization.3.name = organization3\n" +
          "organization.3.type = group\n" +
          "organization.3.members = 2\n" +
          "subject.1.permission.2 = function" +
          "";
  setup(content);
  Set<OrganizationIdentity> organizations = accessController.getAvailableOrganizations(createCredentials(1));
  assertEquals(2, organizations.size());
  assertOrganizationID(organizations, 1);
  assertOrganizationID(organizations, 2);
}