EntityPatientDiscoveryProxyWebServiceSecuredImpl extends EntityPatientDiscoveryProxyWebServicAbstract implements EntityPatientDiscoveryProxy { @Override public RespondingGatewayPRPAIN201306UV02ResponseType respondingGatewayPRPAIN201305UV02(PRPAIN201305UV02 pdRequest, AssertionType assertion, NhinTargetCommunitiesType targetCommunities) { return super.respondingGatewayPRPAIN201305UV02(EntityPatientDiscoverySecuredPortType.class, getEndpointURL(), pdRequest, assertion, targetCommunities); }  @Override RespondingGatewayPRPAIN201306UV02ResponseType respondingGatewayPRPAIN201305UV02(PRPAIN201305UV02 pdRequest,
        AssertionType assertion, NhinTargetCommunitiesType targetCommunities);  }
@Test @SuppressWarnings("unchecked") public void testRespondingGatewayPRPAIN201305UV02Happy() { try { final RespondingGatewayPRPAIN201306UV02ResponseType mockResponse = context .mock(RespondingGatewayPRPAIN201306UV02ResponseType.class); context.checking(new Expectations() { { atLeast(1).of(mockCONNECTClient).invokePort(with(any(Class.class)), with(any(String.class)), with(anything())); will(returnValue(mockResponse)); } }); final WebServiceProxyHelper wsProxyHelper = new WebServiceProxyHelper() { @Override public Object invokePort(Object portObject, Class portClass, String methodName, Object... operationInput) throws Exception { return null; } }; EntityPatientDiscoveryProxyWebServiceSecuredImpl sut = new EntityPatientDiscoveryProxyWebServiceSecuredImpl() { @Override protected WebServiceProxyHelper createWebServiceProxyHelper() { return wsProxyHelper; } @Override protected String getEndpointURL() { return ""; } @Override protected CONNECTClient<EntityPatientDiscoverySecuredPortType> getClient(String url, AssertionType assertion) { return mockCONNECTClient; } @Override protected CONNECTClient<EntityPatientDiscoverySecuredPortType> getSecuredPortClient(String url, AssertionType assertion) { return mockCONNECTClient; } }; RespondingGatewayPRPAIN201306UV02ResponseType response = sut.respondingGatewayPRPAIN201305UV02( mockPdRequest, mockAssertion, mockTargetCommunities); assertNotNull("RespondingGatewayPRPAIN201306UV02ResponseType was null", response); } catch (Throwable t) { System.out.println("Error running testRespondingGatewayPRPAIN201305UV02Happy test: " + t.getMessage()); t.printStackTrace(); fail("Error running testRespondingGatewayPRPAIN201305UV02Happy test: " + t.getMessage()); } }
@Test public void testRespondingGatewayPRPAIN201305UV02NullPRPAIN201305UV02() { try { EntityPatientDiscoveryProxyWebServiceSecuredImpl webProxy = new EntityPatientDiscoveryProxyWebServiceSecuredImpl() { @Override protected WebServiceProxyHelper createWebServiceProxyHelper() { return mockWebServiceProxyHelper; } @Override protected String getEndpointURL() { return ""; } }; RespondingGatewayPRPAIN201306UV02ResponseType response = webProxy.respondingGatewayPRPAIN201305UV02(null, mockAssertion, mockTargetCommunities); assertNull("RespondingGatewayPRPAIN201306UV02ResponseType was not null", response); } catch (Throwable t) { System.out.println("Error running testRespondingGatewayPRPAIN201305UV02NullPRPAIN201305UV02 test: " + t.getMessage()); t.printStackTrace(); fail("Error running testRespondingGatewayPRPAIN201305UV02NullPRPAIN201305UV02 test: " + t.getMessage()); } }
@Test public void testRespondingGatewayPRPAIN201305UV02NullAssertionType() { try { EntityPatientDiscoveryProxyWebServiceSecuredImpl webProxy = new EntityPatientDiscoveryProxyWebServiceSecuredImpl() { @Override protected WebServiceProxyHelper createWebServiceProxyHelper() { return mockWebServiceProxyHelper; } @Override protected String getEndpointURL() { return ""; } }; RespondingGatewayPRPAIN201306UV02ResponseType response = webProxy.respondingGatewayPRPAIN201305UV02( mockPdRequest, null, mockTargetCommunities); assertNull("RespondingGatewayPRPAIN201306UV02ResponseType was not null", response); } catch (Throwable t) { System.out.println("Error running testRespondingGatewayPRPAIN201305UV02NullAssertionType test: " + t.getMessage()); t.printStackTrace(); fail("Error running testRespondingGatewayPRPAIN201305UV02NullAssertionType test: " + t.getMessage()); } }
@Test public void testRespondingGatewayPRPAIN201305UV02NullNhinTargetCommunitiesType() { try { EntityPatientDiscoveryProxyWebServiceSecuredImpl webProxy = new EntityPatientDiscoveryProxyWebServiceSecuredImpl() { @Override protected WebServiceProxyHelper createWebServiceProxyHelper() { return mockWebServiceProxyHelper; } @Override protected String getEndpointURL() { return ""; } }; RespondingGatewayPRPAIN201306UV02ResponseType response = webProxy.respondingGatewayPRPAIN201305UV02( mockPdRequest, mockAssertion, null); assertNull("RespondingGatewayPRPAIN201306UV02ResponseType was not null", response); } catch (Throwable t) { System.out .println("Error running testRespondingGatewayPRPAIN201305UV02NullNhinTargetCommunitiesType test: " + t.getMessage()); t.printStackTrace(); fail("Error running testRespondingGatewayPRPAIN201305UV02NullNhinTargetCommunitiesType test: " + t.getMessage()); } }