StandardOutboundDocSubmissionDeferredResponse implements OutboundDocSubmissionDeferredResponse { protected boolean hasNhinTargetHomeCommunityId( RespondingGatewayProvideAndRegisterDocumentSetSecuredResponseRequestType 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()); } StandardOutboundDocSubmissionDeferredResponse(); @OutboundProcessingEvent(beforeBuilder = DeferredResponseDescriptionBuilder.class, afterReturningBuilder = DocSubmissionArgTransformerBuilder.class, serviceType = "Document Submission Deferred Response", version = "") @Override XDRAcknowledgementType provideAndRegisterDocumentSetBAsyncResponse(RegistryResponseType request,
        AssertionType assertion, NhinTargetCommunitiesType targets);  }
@Test public void testHasNhinTargetHomeCommunityId() { StandardOutboundDocSubmissionDeferredResponse entityOrch = createEntityDocSubmissionDeferredResponseOrchImpl( getAuditLogger(true)); assertFalse(entityOrch.hasNhinTargetHomeCommunityId(null)); RespondingGatewayProvideAndRegisterDocumentSetSecuredResponseRequestType request = new RespondingGatewayProvideAndRegisterDocumentSetSecuredResponseRequestType(); 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(); 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)); }