public async Task Then_Gets_The_Available_Dates_From_The_Query(
            long accountLegalEntityId,
            [Frozen] Mock <IMediator> mockMediator,
            TrainingDateService trainingDateService)
        {
            await trainingDateService.GetTrainingDates(accountLegalEntityId);

            mockMediator.Verify(x => x.Send(
                                    It.Is <GetAvailableDatesQuery>(query => query.AccountLegalEntityId == accountLegalEntityId),
                                    It.IsAny <CancellationToken>()),
                                Times.Once);
        }
        public async Task Then_The_Returned_Dates_Are_Mapped_To_The_Model(
            long accountLegalEntityId,
            [Frozen] Mock <IMediator> mockMediator,
            IList <TrainingDateModel> expectedAvailableDates,
            TrainingDateService trainingDateService)
        {
            mockMediator.Setup(x => x.Send(It.IsAny <GetAvailableDatesQuery>(), It.IsAny <CancellationToken>()))
            .ReturnsAsync(new GetAvailableDatesResult
            {
                AvailableDates = expectedAvailableDates
            });

            var dates = await trainingDateService.GetTrainingDates(accountLegalEntityId);

            Assert.IsNotNull(dates);
            Assert.AreEqual(expectedAvailableDates.Count, dates.Count());
        }