PassthroughInboundDocSubmissionDeferredResponse extends AbstractInboundDocSubmissionDeferredResponse { public PassthroughInboundDocSubmissionDeferredResponse() { this(new AdapterDocSubmissionDeferredResponseProxyObjectFactory(), new DSDeferredResponseAuditLogger()); } PassthroughInboundDocSubmissionDeferredResponse();  PassthroughInboundDocSubmissionDeferredResponse(
        AdapterDocSubmissionDeferredResponseProxyObjectFactory adapterFactory,
        DSDeferredResponseAuditLogger auditLogger); @Override XDRAcknowledgementType processDocSubmissionResponse(RegistryResponseType body, AssertionType assertion);  }
@Test public void passthroughInboundDocSubmissionDeferredResponse() { RegistryResponseType regResponse = new RegistryResponseType(); AssertionType assertion = new AssertionType(); AdapterDocSubmissionDeferredResponseProxyObjectFactory adapterFactory = mock(AdapterDocSubmissionDeferredResponseProxyObjectFactory.class); AdapterDocSubmissionDeferredResponseProxy adapterProxy = mock(AdapterDocSubmissionDeferredResponseProxy.class); when(adapterFactory.getAdapterDocSubmissionDeferredResponseProxy()).thenReturn(adapterProxy); when(adapterProxy.provideAndRegisterDocumentSetBResponse(regResponse, assertion)).thenReturn(expectedResponse); PassthroughInboundDocSubmissionDeferredResponse passthroughDocSubmission = new PassthroughInboundDocSubmissionDeferredResponse(adapterFactory, getAuditLogger(true)) { @Override protected DSDeferredResponseAuditLogger getAuditLogger() { return new DSDeferredResponseAuditLogger(); } }; XDRAcknowledgementType actualResponse = passthroughDocSubmission.provideAndRegisterDocumentSetBResponse( regResponse, assertion, webContextProperties); assertSame(expectedResponse, actualResponse); verify(mockEJBLogger).auditResponseMessage(eq(regResponse), eq(actualResponse), eq(assertion), isNull(NhinTargetSystemType.class), eq(NhincConstants.AUDIT_LOG_INBOUND_DIRECTION), eq(NhincConstants.AUDIT_LOG_NHIN_INTERFACE), eq(Boolean.FALSE), eq(webContextProperties), eq(NhincConstants.NHINC_XDR_RESPONSE_SERVICE_NAME), any(DSDeferredResponseAuditTransforms.class)); }