ExchangeManager extends AbstractExchangeManager<UDDI_SPEC_VERSION> { @Override public OrganizationType getOrganization(String hcid) throws ExchangeManagerException { return getOrganization(null, hcid); } protected  ExchangeManager(); static ExchangeManager getInstance(); @Override String getDefaultExchange(); @Override void refreshExchangeCacheIfRequired(); @Override OrganizationType getOrganization(String hcid); @Override OrganizationType getOrganization(String exchangeName, String hcid); @Override String getEndpointURL(String hcid, String sServiceName, UDDI_SPEC_VERSION api_spec, String exchangeName); @Override List<OrganizationType> getAllOrganizations(); @Override List<OrganizationType> getAllOrganizations(String exchangeName); boolean updateExchangeInfo(long refreshInterval, BigInteger maxBackups, String defaultExchange); boolean deleteExchange(String exchangeName); boolean saveExchange(ExchangeType exchangeUpdate, String originalExchangeName); List<ExchangeType> getAllExchanges(); List<OrganizationType> getAllOrganizationsBy(String exchangeName); List<EndpointType> getAllEndpointTypesBy(String exchangeName, String hcid); ExchangeInfoType getExchangeInfoView(); boolean isRefreshLocked(); boolean toggleIsDisabledFor(String forExchangeName);  }
@Test public void testGetOrganization() { Exchange<UDDI_SPEC_VERSION> exMgr = createExternalExchangeManager(); try { OrganizationType org = exMgr.getOrganization(HCID_2); assertEquals("DefaultExchange does not match", DEFAULT_EXCHANGE, exMgr.getDefaultExchange()); assertEquals("Organization's HCID does not match", HCID_2, org.getHcid()); } catch (ExchangeManagerException ex) { fail("Error running testGetOrganization: " + ex.getMessage()); } }
@Test public void testOverrideExchange() { Exchange<UDDI_SPEC_VERSION> exMgr = createExternalExchangeManagerForOverride(); try { OrganizationType org = exMgr.getOrganization("3.3"); assertNotNull("Organization is Null", org); verifyOverridesEndpoint(org.getEndpointList().getEndpoint()); } catch (ExchangeManagerException ex) { fail("Error running testOverrideExchange: " + ex.getMessage()); } }