ConnectionHelper { public HashMap<String, OrganizationType> getRemoteHcidFromUUID() { HashMap<String, OrganizationType> organizationMap = new HashMap<>(); List<OrganizationType> organizations = getAllOrganizations(); if (NullChecker.isNotNullish(organizations)) { for (OrganizationType organization : organizations) { organizationMap.put(getOrganizationHcid(organization), organization); } } return organizationMap; }  HashMap<String, OrganizationType> getRemoteHcidFromUUID(); HashMap<String, OrganizationType> getExternalOrganizationsMap(); OrganizationType getLocalOrganization(); Map<String, String> getOrgNameRemoteHcidExternalEntities(); Map<String, String> getRemoteHcidOrgNameMap(); Map<String, String> getOrgNameAndRemoteHcidMap(); OrganizationType getLocalOrganizationFromDefaultExchange(); Map<String, OrganizationType> getOrganizationsFromDefaultExchange();  }
@Test public void testGetRemoteHcidFromUUID() { ConnectionHelper instance = new ConnectionHelper(); List<String> actual = new ArrayList<>(); Map<String, OrganizationType> result = instance.getRemoteHcidFromUUID(); for (Map.Entry<String, OrganizationType> entry : result.entrySet()) { actual.add(entry.getKey()); } assertTrue("Error communityname not available", actual.contains("urn:oid:1.1")); assertTrue("Error communityname not available", actual.contains("urn:oid:2.2")); }
@Test public void testGetRemoteHcidFromUUIDFromEmptyUDDIFile() { ConnectionHelper instance = new ConnectionHelper() { @Override protected List<OrganizationType> getAllOrganizations() { return null; } }; Map<String, String> expResult = new HashMap<>(); Map<String, OrganizationType> result = instance.getRemoteHcidFromUUID(); assertEquals("Error empty UDDI file should not have entries", result, expResult); }