OrganizationServiceImpl extends BaseServiceImpl<Organization> implements OrganizationService { @Override public Organization createOrganization(String name, String description, Persona owner) { return createOrganization(name, description, Visibility.PRIVATE, owner); }  @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(expected = IllegalArgumentException.class) public void cannotCreateOrganizationWithExistingName() { HawkularUser jdoe = userService.getOrCreateById(UUID.randomUUID().toString()); organizationService.createOrganization("cannotCreateOrganizationWithExistingName", "", jdoe); organizationService.createOrganization("cannotCreateOrganizationWithExistingName", "", jdoe); }