PassthroughInboundPatientDiscovery extends AbstractInboundPatientDiscovery { public PassthroughInboundPatientDiscovery() { adapterFactory = new AdapterPatientDiscoveryProxyObjectFactory(); auditLogger = new PatientDiscoveryAuditLogger(); } PassthroughInboundPatientDiscovery();  PassthroughInboundPatientDiscovery(AdapterPatientDiscoveryProxyObjectFactory adapterFactory,
        PatientDiscoveryAuditLogger auditLogger); @Override PRPAIN201306UV02 process(PRPAIN201305UV02 body, AssertionType assertion, Properties webContextProperties); @Override PatientDiscoveryAuditLogger getAuditLogger();  }
@Test public void passthroughInboundPatientDiscovery() throws PatientDiscoveryException { PRPAIN201305UV02 request = new PRPAIN201305UV02(); AssertionType assertion = new AssertionType(); PRPAIN201306UV02 expectedResponse = new PRPAIN201306UV02(); Properties webContextProperties = new Properties(); PatientDiscoveryAuditLogger auditLogger = getAuditLogger(true); when(adapterFactory.create()).thenReturn(adapterProxy); when(adapterProxy.respondingGatewayPRPAIN201305UV02(request, assertion)).thenReturn(expectedResponse); PassthroughInboundPatientDiscovery passthroughPatientDiscovery = new PassthroughInboundPatientDiscovery( adapterFactory, auditLogger); PRPAIN201306UV02 actualResponse = passthroughPatientDiscovery.respondingGatewayPRPAIN201305UV02(request, assertion, webContextProperties); assertSame(expectedResponse, actualResponse); verify(mockEJBLogger).auditResponseMessage(any(PRPAIN201305UV02.class), any(PRPAIN201306UV02.class), any(AssertionType.class), isNull(NhinTargetSystemType.class), eq(NhincConstants.AUDIT_LOG_INBOUND_DIRECTION), eq(NhincConstants.AUDIT_LOG_NHIN_INTERFACE), eq(Boolean.FALSE), eq(webContextProperties), eq(NhincConstants.PATIENT_DISCOVERY_SERVICE_NAME), any(PatientDiscoveryAuditTransforms.class)); }