@Test
public void testGetAvailableOrganizationsInheritedFromSubjectGroup() throws Exception {

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