OrganizationHandler { public void store(final DbOrganization dbOrganization) { repositoryHandler.store(dbOrganization); } 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 checkStoreOrganization(){ final RepositoryHandler repositoryHandler = mock(RepositoryHandler.class); final OrganizationHandler handler = new OrganizationHandler(repositoryHandler); final DbOrganization dbOrganization = new DbOrganization(); handler.store(dbOrganization); verify(repositoryHandler, times(1)).store(dbOrganization); }