StandardOutboundDocSubmission implements OutboundDocSubmission { protected boolean hasNhinTargetHomeCommunityId( RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType request) { return request != null && request.getNhinTargetCommunities() != null && NullChecker.isNotNullish(request.getNhinTargetCommunities().getNhinTargetCommunity()) && request.getNhinTargetCommunities().getNhinTargetCommunity().get(0) != null && request.getNhinTargetCommunities().getNhinTargetCommunity().get(0).getHomeCommunity() != null && NullChecker.isNotNullish(request.getNhinTargetCommunities().getNhinTargetCommunity().get(0) .getHomeCommunity().getHomeCommunityId()); } StandardOutboundDocSubmission(); @Override @OutboundProcessingEvent(beforeBuilder = DocSubmissionBaseEventDescriptionBuilder.class, afterReturningBuilder = DocSubmissionBaseEventDescriptionBuilder.class, serviceType = "Document Submission", version = "") RegistryResponseType provideAndRegisterDocumentSetB(ProvideAndRegisterDocumentSetRequestType body,
        AssertionType assertion, NhinTargetCommunitiesType targets, UrlInfoType urlInfo);  }
@Test public void testHasNhinTargetHomeCommunityId() { StandardOutboundDocSubmission entityOrch = new StandardOutboundDocSubmission(); assertFalse(entityOrch.hasNhinTargetHomeCommunityId(null)); RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType request = new RespondingGatewayProvideAndRegisterDocumentSetSecuredRequestType(); assertFalse(entityOrch.hasNhinTargetHomeCommunityId(request)); NhinTargetCommunitiesType targetCommunities = new NhinTargetCommunitiesType(); request.setNhinTargetCommunities(targetCommunities); assertFalse(entityOrch.hasNhinTargetHomeCommunityId(request)); request.getNhinTargetCommunities().getNhinTargetCommunity().add(null); request.setNhinTargetCommunities(targetCommunities); assertFalse(entityOrch.hasNhinTargetHomeCommunityId(request)); targetCommunities = createNhinTargetCommunitiesType(receiverHcid); request.setNhinTargetCommunities(targetCommunities); assertTrue(entityOrch.hasNhinTargetHomeCommunityId(request)); request.getNhinTargetCommunities().getNhinTargetCommunity().get(0).getHomeCommunity().setHomeCommunityId(null); assertFalse(entityOrch.hasNhinTargetHomeCommunityId(request)); request.getNhinTargetCommunities().getNhinTargetCommunity().get(0).setHomeCommunity(null); assertFalse(entityOrch.hasNhinTargetHomeCommunityId(request)); }