PassthroughOutboundDocSubmission implements OutboundDocSubmission { @Override public RegistryResponseType provideAndRegisterDocumentSetB(ProvideAndRegisterDocumentSetRequestType body, AssertionType assertion, NhinTargetCommunitiesType targets, UrlInfoType urlInfo) { logInfoServiceProcess(this.getClass()); NhinTargetSystemType targetSystem = MessageGeneratorUtils.getInstance().convertFirstToNhinTargetSystemType( targets); assertion = MessageGeneratorUtils.getInstance().generateMessageId(assertion); RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType request = createAuditRequest(body, assertion, targetSystem); auditRequest(request, assertion, request.getNhinTargetSystem()); OutboundDocSubmissionOrchestratable dsOrchestratable = createOrchestratable(dsDelegate, body, targetSystem, assertion); RegistryResponseType response = ((OutboundDocSubmissionOrchestratable) dsDelegate.process(dsOrchestratable)) .getResponse(); return response; } PassthroughOutboundDocSubmission();  PassthroughOutboundDocSubmission(DocSubmissionAuditLogger auditLogger, OutboundDocSubmissionDelegate dsDelegate); @Override RegistryResponseType provideAndRegisterDocumentSetB(ProvideAndRegisterDocumentSetRequestType body,
        AssertionType assertion, NhinTargetCommunitiesType targets, UrlInfoType urlInfo);  }
@Test public void testProvideAndRegisterDocumentSetB() { when(mockDelegate.process(any(OutboundDocSubmissionOrchestratable.class))).thenReturn( createOutboundDocSubmissionOrchestratable()); ProvideAndRegisterDocumentSetRequestType request = new ProvideAndRegisterDocumentSetRequestType(); AssertionType assertion = new AssertionType(); NhinTargetCommunitiesType targets = new NhinTargetCommunitiesType(); RegistryResponseType response = runProvideAndRegisterDocumentSetB(request, assertion, targets, true); assertNotNull(response); assertEquals(DocumentConstants.XDS_SUBMISSION_RESPONSE_STATUS_SUCCESS, response.getStatus()); assertNotNull("Assertion MessageId is null", assertion.getMessageId()); verify(mockEJBLogger).auditRequestMessage(eq(request), eq(assertion), any(NhinTargetSystemType.class), eq(NhincConstants.AUDIT_LOG_OUTBOUND_DIRECTION), eq(NhincConstants.AUDIT_LOG_NHIN_INTERFACE), eq(Boolean.TRUE), isNull(Properties.class), eq(NhincConstants.NHINC_XDR_SERVICE_NAME), any(DocSubmissionAuditTransforms.class)); }