OrganizationServiceImpl extends BaseServiceImpl<Organization> implements OrganizationService { @Override public List<Organization> getOrganizationsForPersona(Persona persona) { return getOrganizationsFromMemberships(membershipService.getMembershipsForPersona(persona)); }  @Override Organization getById(UUID id); @Override Organization getByName(String name); @Override Organization get(String id); @Override List<Organization> getFilteredOrganizationsToJoin(Persona persona); @Override List<Organization> getOrganizationsToJoin(); @Override List<Organization> getOrganizationsForPersona(Persona persona); @Override List<Organization> getOrganizationsFromMemberships(List<OrganizationMembership> memberships); @Override Organization createOrganization(String name, String description, Persona owner); @Override Organization createOrganization(String name, String description, Visibility visibility, Persona owner); @Override void deleteOrganization(Organization organization); @Override void transfer(Organization organization, Persona newOwner); @Override List<Organization> getSubOrganizations(Organization organization);  }
@Test public void listOrganizationsForUserNotBelongingToAnyOrganization() { HawkularUser jdoe = userService.getOrCreateById(UUID.randomUUID().toString()); List<Organization> organizations = organizationService.getOrganizationsForPersona(jdoe); assertEquals("The persona should not belong to any organizations", 0, organizations.size()); }