PassthroughOutboundAdminDistribution implements OutboundAdminDistribution { @Override public void sendAlertMessage(RespondingGatewaySendAlertMessageSecuredType message, AssertionType assertion, NhinTargetCommunitiesType target) { RespondingGatewaySendAlertMessageType request = msgUtils.convertToUnsecured(message, ADMessageGeneratorUtils.getInstance().generateMessageId(assertion), target); sendAlertMessage(request, assertion, target); } PassthroughOutboundAdminDistribution();  PassthroughOutboundAdminDistribution(OutboundAdminDistributionDelegate adDelegate); @Override void sendAlertMessage(RespondingGatewaySendAlertMessageSecuredType message, AssertionType assertion,
        NhinTargetCommunitiesType target); @Override void sendAlertMessage(RespondingGatewaySendAlertMessageType request, AssertionType assertion,
        NhinTargetCommunitiesType targetCommunities);  }
@Test public void outboundUnsecured() { RespondingGatewaySendAlertMessageType request = new RespondingGatewaySendAlertMessageType(); AssertionType assertion = new AssertionType(); NhinTargetCommunitiesType targetCommunities = new NhinTargetCommunitiesType(); OutboundAdminDistributionDelegate adDelegate = mock(OutboundAdminDistributionDelegate.class); PassthroughOutboundAdminDistribution passthroughAdmin = new PassthroughOutboundAdminDistribution(adDelegate); passthroughAdmin.sendAlertMessage(request, assertion, targetCommunities); assertNotNull("Assertion MessageId is null", assertion.getMessageId()); verify(adDelegate).process(any(OutboundAdminDistributionOrchestratable.class)); }
@Test public void outboundSecured() { RespondingGatewaySendAlertMessageSecuredType request = new RespondingGatewaySendAlertMessageSecuredType(); AssertionType assertion = new AssertionType(); NhinTargetCommunitiesType targetCommunities = new NhinTargetCommunitiesType(); OutboundAdminDistributionDelegate adDelegate = mock(OutboundAdminDistributionDelegate.class); PassthroughOutboundAdminDistribution passthroughAdmin = new PassthroughOutboundAdminDistribution(adDelegate); passthroughAdmin.sendAlertMessage(request, assertion, targetCommunities); assertNotNull("Assertion MessageId is null", assertion.getMessageId()); verify(adDelegate).process(any(OutboundAdminDistributionOrchestratable.class)); }