public async Task CreateEmptyReview_creates_expected_empty_review_outcomes()
        {
            _mediator.Setup(x => x.Send(It.IsAny <GetBlindAssessmentOutcomeRequest>(), It.IsAny <CancellationToken>())).ReturnsAsync(new BlindAssessmentOutcome());

            _mediator.Setup(x => x.Send(It.IsAny <GetAllBlindAssessmentOutcomesRequest>(), It.IsAny <CancellationToken>())).ReturnsAsync(new List <BlindAssessmentOutcome>());

            await _reviewCreationService.CreateEmptyReview(_applicationId, _userId, _userName);

            var allSections = _sequences.SelectMany(seq => seq.Sections);
            var allSectionsExcludingSectors = allSections.Where(sec => sec.SequenceNumber != RoatpWorkflowSequenceIds.DeliveringApprenticeshipTraining || sec.SectionNumber != RoatpWorkflowSectionIds.DeliveringApprenticeshipTraining.YourSectorsAndEmployees);
            var sectionPages = allSectionsExcludingSectors.SelectMany(sec => sec.Pages).ToList();

            var expectedNumberOfOutcomes = sectionPages.Count + _sectors.Count + 1; // Note: Add 1 due to inserted Management Hierarchy Financial page

            _mediator.Verify(x =>
                             x.Send(It.Is <CreateEmptyModeratorReviewRequest>(r =>
                                                                              r.PageReviewOutcomes.Count == expectedNumberOfOutcomes &&
                                                                              r.PageReviewOutcomes.TrueForAll(y =>
                                                                                                              _sectors.Exists(s => s.PageId == y.PageId) ||
                                                                                                              sectionPages.Exists(p => p.PageId == y.PageId) ||
                                                                                                              y.PageId == RoatpWorkflowPageIds.DeliveringApprenticeshipTraining.ManagementHierarchy_Financial)),
                                    It.IsAny <CancellationToken>()),
                             Times.Once);
        }
        public async Task CreateEmptyReview_creates_empty_review_outcomes()
        {
            await _reviewCreationService.CreateEmptyReview(_applicationId, _userId, _userName);

            var allSections = _sequences.SelectMany(seq => seq.Sections);
            var allSectionsExclusingSectors = allSections.Where(sec => sec.SequenceNumber != RoatpWorkflowSequenceIds.DeliveringApprenticeshipTraining || sec.SectionNumber != RoatpWorkflowSectionIds.DeliveringApprenticeshipTraining.YourSectorsAndEmployees);
            var sectionPages = allSectionsExclusingSectors.SelectMany(sec => sec.Pages).ToList();

            var expectedNumberOfOutcomes = sectionPages.Count + _sectors.Count;

            _mediator.Verify(x =>
                             x.Send(It.Is <CreateEmptyModeratorReviewRequest>(r =>
                                                                              r.PageReviewOutcomes.Count == expectedNumberOfOutcomes &&
                                                                              r.PageReviewOutcomes.TrueForAll(y =>
                                                                                                              _sectors.Exists(s => s.PageId == y.PageId) ||
                                                                                                              sectionPages.Exists(p => p.PageId == y.PageId))),
                                    It.IsAny <CancellationToken>()),
                             Times.Once);
        }