EntityPatientDiscoveryProxyJavaImpl implements EntityPatientDiscoveryProxy { @Override public RespondingGatewayPRPAIN201306UV02ResponseType respondingGatewayPRPAIN201305UV02(PRPAIN201305UV02 pdRequest, AssertionType assertion, NhinTargetCommunitiesType targetCommunities) { LOG.debug("Begin respondingGatewayPRPAIN201305UV02"); RespondingGatewayPRPAIN201306UV02ResponseType response = null; StandardOutboundPatientDiscovery processor = getEntityPatientDiscoveryProcessor(); if (processor == null) { LOG.warn("EntityPatientDiscoveryProcessor was null"); } else { RespondingGatewayPRPAIN201305UV02RequestType processorRequest = new RespondingGatewayPRPAIN201305UV02RequestType(); processorRequest.setPRPAIN201305UV02(pdRequest); processorRequest.setAssertion(assertion); processorRequest.setNhinTargetCommunities(targetCommunities); response = processor.respondingGatewayPRPAIN201305UV02(processorRequest, assertion); } LOG.debug("End respondingGatewayPRPAIN201305UV02"); return response; }  @Override RespondingGatewayPRPAIN201306UV02ResponseType respondingGatewayPRPAIN201305UV02(PRPAIN201305UV02 pdRequest,
            AssertionType assertion, NhinTargetCommunitiesType targetCommunities);  }
@Test public void testRespondingGatewayPRPAIN201305UV02Happy() { try { EntityPatientDiscoveryProxyJavaImpl sut = new EntityPatientDiscoveryProxyJavaImpl() { @Override protected StandardOutboundPatientDiscovery getEntityPatientDiscoveryProcessor() { return mockProcessor; } }; context.checking(new Expectations() { { oneOf(mockProcessor).respondingGatewayPRPAIN201305UV02( with(aNonNull(RespondingGatewayPRPAIN201305UV02RequestType.class)), with(aNonNull(AssertionType.class))); } }); 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 testRespondingGatewayPRPAIN201305UV02NullProcessor() { try { EntityPatientDiscoveryProxyJavaImpl sut = new EntityPatientDiscoveryProxyJavaImpl() { @Override protected StandardOutboundPatientDiscovery getEntityPatientDiscoveryProcessor() { return null; } }; RespondingGatewayPRPAIN201306UV02ResponseType response = sut.respondingGatewayPRPAIN201305UV02( mockPdRequest, mockAssertion, mockTargetCommunities); assertNull("RespondingGatewayPRPAIN201306UV02ResponseType was not null", response); } catch (Throwable t) { System.out.println("Error running testRespondingGatewayPRPAIN201305UV02NullProcessor test: " + t.getMessage()); t.printStackTrace(); fail("Error running testRespondingGatewayPRPAIN201305UV02NullProcessor test: " + t.getMessage()); } }