ConnectionManagerCache implements ConnectionManager { @Override public Set<BusinessEntity> getBusinessEntitySet(List<String> saHomeCommunityId) throws ConnectionManagerException { Set<BusinessEntity> oEntities = new HashSet<>(); checkLoaded(); if (CollectionUtils.isEmpty(saHomeCommunityId)) { return null; } for (String sHomeCommunityId : saHomeCommunityId) { BusinessEntity oEntity = getBusinessEntity(sHomeCommunityId); if (oEntity != null) { oEntities.add(oEntity); } } if (CollectionUtils.isNotEmpty(oEntities)) { return oEntities; } else { return null; } } ConnectionManagerCache();  ConnectionManagerCache(PropertyAccessor accessor); static ConnectionManagerCache getInstance(); void setCommunityId(BusinessEntity businessEntity, String newId); void forceRefreshUDDICache(); void forceRefreshInternalConnectCache(); @Override List<BusinessEntity> getAllBusinessEntities(); @Override BusinessEntity getBusinessEntity(String sHomeCommunityId); @Override String getBusinessEntityName(String homeCommunityId); @Override Set<BusinessEntity> getBusinessEntitySet(List<String> saHomeCommunityId); @Override BusinessEntity getBusinessEntityByServiceName(String sHomeCommunityId, String sUniformServiceName); @Override BusinessEntity getBusinessEntityByHCID(String sHomeCommunityId); @Override Set<BusinessEntity> getBusinessEntitySetByServiceName(List<String> saHomeCommunityId,
        String sUniformServiceName); @Override Set<BusinessEntity> getAllBusinessEntitySetByServiceName(String sUniformServiceName); @Override List<UDDI_SPEC_VERSION> getSpecVersions(String homeCommunityId,
        NhincConstants.NHIN_SERVICE_NAMES serviceName); @Override String getAdapterEndpointURL(String sHomeCommunityId, String sServiceName, ADAPTER_API_LEVEL level); @Override String getAdapterEndpointURL(String sServiceName, ADAPTER_API_LEVEL level); @Override String getDefaultEndpointURLByServiceName(String sHomeCommunityId, String sUniformServiceName); @Override String getEndpointURLByServiceNameSpecVersion(String sHomeCommunityId, String sUniformServiceName,
        UDDI_SPEC_VERSION version); @Override String getInternalEndpointURLByServiceName(String sUniformServiceName); @Override String getEndpointURLFromNhinTarget(NhinTargetSystemType targetSystem, String serviceName); @Override List<UrlInfo> getEndpointURLFromNhinTargetCommunities(NhinTargetCommunitiesType targets, String serviceName); boolean updateInternalServiceUrl(String serviceName, String url);  }
@Test public void testGetBusinessEntitySet() { try { ConnectionManagerCache connectionManager = createConnectionManager(); List<String> hcidList = new ArrayList<>(); hcidList.add(HCID_1); hcidList.add(HCID_2); Set<BusinessEntity> entitySet = connectionManager.getBusinessEntitySet(hcidList); assertEquals(2, entitySet.size()); entitySet = connectionManager.getBusinessEntitySet(null); assertNull(entitySet); hcidList = new ArrayList<>(); hcidList.add("hcidValue1123"); hcidList.add("hcidValue2123"); entitySet = connectionManager.getBusinessEntitySet(hcidList); assertNull(entitySet); } catch (Throwable t) { t.printStackTrace(); fail("Error running testGetBusinessEntitySet test: " + t.getMessage()); } }