OrganizationServiceImpl extends AbstractConsoleService<OrganizationTblDao> implements OrganizationService { List<OrganizationTbl> retrieveOrgInfoFromRemote() { return TransactionMonitor.DEFAULT.logTransactionSwallowException("OrganizationService", "retrieveOrgInfoFromRemote", new Callable<List<OrganizationTbl>>() { @Override public List<OrganizationTbl> call() { List<OrganizationModel> organizationModels = Organization.DEFAULT.retrieveOrganizationInfo(); return organizationModels .stream() .map(org-> new OrganizationTbl().setOrgId(org.getId()).setOrgName(org.getName()) ) .collect(Collectors.toList()); } }); }  @Override void updateOrganizations(); @Override List<OrganizationTbl> getAllOrganizations(); @Override OrganizationTbl getOrganizationTblByCMSOrganiztionId(long organizationId); @Override OrganizationTbl getOrgByName(String name); @Override List<OrganizationTbl> getInvolvedOrgs(); @Override OrganizationTbl getOrganization(long xpipeOrgId);  }
@Test public void testRetrieveOrgInfoFromRemote() throws InterruptedException { List<OrganizationTbl> orgs = organizationService.retrieveOrgInfoFromRemote(); orgs.forEach(org->logger.info("{}", org)); Assert.assertNotNull(orgs); }