public async Task Arrange()
        {
            _apprenticeshipIncentiveData = new Fixture().CreateMany <ApprenticeshipIncentiveModel>();
            _hashedAccountId             = Guid.NewGuid().ToString();
            _hashedAccountLegalEntityId  = Guid.NewGuid().ToString();
            _organisationName            = Guid.NewGuid().ToString();

            _mockLegalEntitiesService = new Mock <ILegalEntitiesService>();
            _mockLegalEntitiesService
            .Setup(m => m.Get(_hashedAccountId, _hashedAccountLegalEntityId))
            .ReturnsAsync(new LegalEntityModel()
            {
                Name = _organisationName
            });

            _mockApprenticeshipIncentiveService = new Mock <IApprenticeshipIncentiveService>();
            _mockApprenticeshipIncentiveService
            .Setup(m => m.GetList(_hashedAccountId, _hashedAccountLegalEntityId))
            .ReturnsAsync(_apprenticeshipIncentiveData);

            var selected = new SelectApprenticeshipsRequest()
            {
                AccountId               = _hashedAccountId,
                AccountLegalEntityId    = _hashedAccountLegalEntityId,
                SelectedApprenticeships = _apprenticeshipIncentiveData.Where(a => a.Selected).Select(a => a.Id).ToList()
            };

            _emailAddress = "*****@*****.**";
            var claims = new[] { new Claim(EmployerClaimTypes.EmailAddress, _emailAddress) };
            var user   = new ClaimsPrincipal(new ClaimsIdentity(claims));

            _sut = new Web.Controllers.CancelController(_mockApprenticeshipIncentiveService.Object, _mockLegalEntitiesService.Object)
            {
                TempData          = new TempDataDictionary(new DefaultHttpContext(), Mock.Of <ITempDataProvider>()),
                ControllerContext = new ControllerContext {
                    HttpContext = new DefaultHttpContext {
                        User = user
                    }
                }
            };

            _mockApprenticeshipIncentiveService
            .Setup(m => m.Cancel(_hashedAccountLegalEntityId, _apprenticeshipIncentiveData.Where(a => a.Selected),
                                 _hashedAccountId, _emailAddress))
            .Verifiable();

            _result = await _sut.Cancelled(selected, _hashedAccountId);

            _model = ((ViewResult)_result).Model as CancelledApprenticeshipsViewModel;
        }
        public async Task Then_redirects_to_payments_page_when_no_apprenticeships_selected()
        {
            // arrange
            var selected = new SelectApprenticeshipsRequest()
            {
                AccountId               = _hashedAccountId,
                AccountLegalEntityId    = _hashedAccountLegalEntityId,
                SelectedApprenticeships = new List <string>()
            };

            // act
            var result = (await _sut.Cancelled(selected, _hashedAccountId)) as RedirectToActionResult;

            // assert
            result.ControllerName.Should().Be("Payments");
            result.ActionName.Should().Be("ListPaymentsForLegalEntity");
            result.RouteValues["accountId"].Should().Be(_hashedAccountId);
            result.RouteValues["accountLegalEntityId"].Should().Be(_hashedAccountLegalEntityId);
        }