public async Task ShouldCallTheMediatorBulkUpload() { var providerId = 1L; var commitmentId = 2L; var request = new BulkApprenticeshipRequest { LastUpdatedByInfo = new LastUpdateInfo { EmailAddress = "*****@*****.**", Name = "Bob" }, UserId = "User", Apprenticeships = new List <Types.Apprenticeship.Apprenticeship>() }; await Orchestrator.CreateApprenticeships(providerId, commitmentId, request); MockMediator.Verify( x => x.SendAsync( It.Is <BulkUploadApprenticeshipsCommand>( y => y.Caller.Id == providerId && y.Caller.CallerType == CallerType.Provider && y.CommitmentId == commitmentId && y.UserId == request.UserId && y.UserName == request.LastUpdatedByInfo.Name)), Times.Once); }