public async Task TheCommitmentAgreementsReturnedFromHandlerAreMapped()
        {
            const long providerId = 54321L;

            _mediator.Setup(m => m.Send(It.IsAny <GetCommitmentAgreementsQueryRequest>(), new CancellationToken()))
            .ReturnsAsync(new GetCommitmentAgreementsQueryResponse
            {
                CommitmentAgreements = new List <CommitmentAgreement>
                {
                    new CommitmentAgreement()
                }
            });

            var mappedCommitmentAgreement = new Web.Models.Agreement.CommitmentAgreement
            {
                AgreementID      = "agree",
                CohortID         = "cohort",
                OrganisationName = "org"
            };

            _agreementMapper.Setup(m => m.Map(It.IsAny <CommitmentAgreement>()))
            .Returns(mappedCommitmentAgreement);

            var result = await _orchestrator.GetAgreementsViewModel(providerId);

            Assert.IsNotNull(result);
            Assert.IsTrue(TestHelper.EnumerablesAreEqual(new[] { mappedCommitmentAgreement }, result.CommitmentAgreements));
        }
        public async Task <ActionResult> Agreements(long providerId)
        {
            var model = await _orchestrator.GetAgreementsViewModel(providerId);

            return(View(model));
        }