OrganizationHandler { public List<String> getOrganizationNames() { return repositoryHandler.getOrganizationNames(); } OrganizationHandler(final RepositoryHandler repositoryHandler); void store(final DbOrganization dbOrganization); List<String> getOrganizationNames(); DbOrganization getOrganization(final String organizationId); void deleteOrganization(final String organizationId); List<String> getCorporateGroupIds(final String organizationId); void addCorporateGroupId(final String organizationId, final String corporateGroupId); void removeCorporateGroupId(final String organizationId, final String corporateGroupId); DbOrganization getMatchingOrganization(final DbModule dbModule);  }
@Test public void getAllOrganizationNames(){ final RepositoryHandler repositoryHandler = mock(RepositoryHandler.class); final OrganizationHandler handler = new OrganizationHandler(repositoryHandler); handler.getOrganizationNames(); verify(repositoryHandler, times(1)).getOrganizationNames(); }