StandardInboundDocSubmissionDeferredResponse extends AbstractInboundDocSubmissionDeferredResponse { public StandardInboundDocSubmissionDeferredResponse() { this(new AdapterDocSubmissionDeferredResponseProxyObjectFactory(), new XDRPolicyChecker(), PropertyAccessor .getInstance(), new DSDeferredResponseAuditLogger()); } StandardInboundDocSubmissionDeferredResponse();  StandardInboundDocSubmissionDeferredResponse(
        AdapterDocSubmissionDeferredResponseProxyObjectFactory adapterFactory, XDRPolicyChecker policyChecker,
        PropertyAccessor propertyAccessor, DSDeferredResponseAuditLogger auditLogger); @Override @InboundProcessingEvent(beforeBuilder = DeferredResponseDescriptionBuilder.class, afterReturningBuilder = DocSubmissionArgTransformerBuilder.class, serviceType = "Document Submission Deferred Response", version = "") XDRAcknowledgementType provideAndRegisterDocumentSetBResponse(RegistryResponseType body,
        AssertionType assertion, Properties webContextProperties); @Override XDRAcknowledgementType processDocSubmissionResponse(RegistryResponseType body, AssertionType assertion);  }
@Test public void standardInboundDocSubmissionDeferredResponse() throws PropertyAccessException { String localHCID = "1.1"; String senderHCID = "2.2"; assertion.setHomeCommunity(new HomeCommunityType()); assertion.getHomeCommunity().setHomeCommunityId(senderHCID); XDRAcknowledgementType expectedResponse = new XDRAcknowledgementType(); when(adapterFactory.getAdapterDocSubmissionDeferredResponseProxy()).thenReturn(adapterProxy); when(adapterProxy.provideAndRegisterDocumentSetBResponse(regResponse, assertion)).thenReturn(expectedResponse); when( propertyAccessor.getProperty(NhincConstants.GATEWAY_PROPERTY_FILE, NhincConstants.HOME_COMMUNITY_ID_PROPERTY)).thenReturn(localHCID); when( policyChecker.checkXDRResponsePolicy(regResponse, assertion, senderHCID, localHCID, NhincConstants.POLICYENGINE_INBOUND_DIRECTION)).thenReturn(true); StandardInboundDocSubmissionDeferredResponse standardDocSubmission = new StandardInboundDocSubmissionDeferredResponse(adapterFactory, policyChecker, propertyAccessor, getAuditLogger(true)); XDRAcknowledgementType actualResponse = standardDocSubmission.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)); }