EntityPatientDiscoveryProxyWebServiceUnsecuredImpl extends EntityPatientDiscoveryProxyWebServicAbstract implements EntityPatientDiscoveryProxy { protected String getEndpointURL() { String serviceName = NhincConstants.ENTITY_PATIENT_DISCOVERY_SERVICE_NAME; return super.getEndpointURLForService(serviceName); } EntityPatientDiscoveryProxyWebServiceUnsecuredImpl(); @Override RespondingGatewayPRPAIN201306UV02ResponseType respondingGatewayPRPAIN201305UV02(PRPAIN201305UV02 pdRequest,
        AssertionType assertion, NhinTargetCommunitiesType targetCommunities);  }
@Test public void testGetEndpointURLHappy() { try { EntityPatientDiscoveryProxyWebServiceUnsecuredImpl webProxy = new EntityPatientDiscoveryProxyWebServiceUnsecuredImpl() { @Override protected WebServiceProxyHelper createWebServiceProxyHelper() { return mockWebServiceProxyHelper; } @Override protected String getEndpointURLFromExchange(String serviceName) throws ExchangeManagerException { return "test_endpoint"; } }; String endpointURL = webProxy.getEndpointURL(); assertNotNull("EndpointURL was null", endpointURL); assertEquals("EndpointURL was not correct", "test_endpoint", endpointURL); } catch (Throwable t) { System.out.println("Error running testGetEndpointURLHappy test: " + t.getMessage()); t.printStackTrace(); fail("Error running testGetEndpointURLHappy test: " + t.getMessage()); } }
@Test public void testGetEndpointURLException() { try { EntityPatientDiscoveryProxyWebServiceUnsecuredImpl webProxy = new EntityPatientDiscoveryProxyWebServiceUnsecuredImpl() { @Override protected WebServiceProxyHelper createWebServiceProxyHelper() { return mockWebServiceProxyHelper; } @Override protected String getEndpointURLFromExchange(String serviceName) throws ExchangeManagerException { throw new ExchangeManagerException(); } }; String endpointURL = webProxy.getEndpointURL(); assertNull("EndpointURL was not null", endpointURL); } catch (Throwable t) { System.out.println("Error running testGetEndpointURLException test: " + t.getMessage()); t.printStackTrace(); fail("Error running testGetEndpointURLException test: " + t.getMessage()); } }