public async Task ThenTheMediatorIsCalledToGetASingledOrgToRemove()
        {
            //Act
            await _orchestrator.GetConfirmRemoveOrganisationViewModel(ExpectedHashedAgreementId, ExpectedHahsedAccountId, ExpectedUserId);

            //Assert
            _mediator.Verify(x => x.SendAsync(It.Is <GetAccountEmployerAgreementRemoveRequest>(
                                                  c => c.HashedAccountId.Equals(ExpectedHahsedAccountId) &&
                                                  c.UserId.Equals(ExpectedUserId) &&
                                                  c.HashedAgreementId.Equals(ExpectedHashedAgreementId)
                                                  )), Times.Once);
        }
        public async Task <ActionResult> ConfirmRemoveOrganisation(string agreementId, string hashedAccountId)
        {
            var model = await _orchestrator.GetConfirmRemoveOrganisationViewModel(agreementId, hashedAccountId, OwinWrapper.GetClaimValue(ControllerConstants.UserRefClaimKeyName));

            var flashMessage = GetFlashMessageViewModelFromCookie();

            if (flashMessage != null)
            {
                model.FlashMessage         = flashMessage;
                model.Data.ErrorDictionary = model.FlashMessage.ErrorMessages;
            }

            return(View(model));
        }
        public async Task <ActionResult> ConfirmRemoveOrganisation(string accountLegalEntityHashedId, string hashedAccountId)
        {
            var model = await _orchestrator.GetConfirmRemoveOrganisationViewModel(accountLegalEntityHashedId, hashedAccountId, OwinWrapper.GetClaimValue(ControllerConstants.UserRefClaimKeyName));

            return(View(model.Data != null && model.Data.CanBeRemoved ? ControllerConstants.ConfirmRemoveOrganisationActionName : ControllerConstants.CannotRemoveOrganisationViewName, model));
        }