StandardInboundPatientDiscovery extends AbstractInboundPatientDiscovery { public StandardInboundPatientDiscovery() { patientDiscoveryProcessor = new PatientDiscovery201305Processor(); auditLogger = new PatientDiscoveryAuditLogger(); } StandardInboundPatientDiscovery();  StandardInboundPatientDiscovery(PatientDiscovery201305Processor patientDiscoveryProcessor,
        PatientDiscoveryAuditLogger auditLogger); @Override @InboundProcessingEvent(beforeBuilder = PRPAIN201305UV02EventDescriptionBuilder.class, afterReturningBuilder = PRPAIN201306UV02EventDescriptionBuilder.class, serviceType = "Patient Discovery", version = "1.0") PRPAIN201306UV02 respondingGatewayPRPAIN201305UV02(PRPAIN201305UV02 body, AssertionType assertion, Properties webContextProperties); @Override PRPAIN201306UV02 process(PRPAIN201305UV02 body, AssertionType assertion, Properties webContextProperties); @Override PatientDiscoveryAuditLogger getAuditLogger();  }
@Test public void standardInboundPatientDiscovery() throws PatientDiscoveryException { PRPAIN201305UV02 request = new PRPAIN201305UV02(); AssertionType assertion = new AssertionType(); Properties webContextProperties = new Properties(); PRPAIN201306UV02 expectedResponse = new PRPAIN201306UV02(); PatientDiscoveryAuditLogger auditLogger = getAuditLogger(true); when(patientDiscoveryProcessor.process201305(request, assertion)).thenReturn(expectedResponse); StandardInboundPatientDiscovery standardPatientDiscovery = new StandardInboundPatientDiscovery( patientDiscoveryProcessor, auditLogger); PRPAIN201306UV02 actualResponse = standardPatientDiscovery .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)); }