public async Task Then_If_There_Is_A_CreateDemandId_Then_It_Is_Read_From_The_Cache(
            GetCreateCourseDemandQuery query,
            CourseDemandRequest cachedData,
            GetCreateCourseDemandResponse response,
            [Frozen] Mock <IDemandService> service,
            GetCreateCourseDemandQueryHandler handler)
        {
            //Arrange
            service.Setup(x => x.GetCachedCourseDemand(query.CreateDemandId.Value)).ReturnsAsync(cachedData);

            //Act
            var actual = await handler.Handle(query, CancellationToken.None);

            //Assert
            service.Verify(x => x.GetCreateCourseDemand(It.IsAny <int>(), It.IsAny <string>()), Times.Never);
        }
        public async Task Then_If_There_Is_A_CreateDemandId_And_The_Cached_Value_Is_Null_Then_The_Service_Is_Called(
            GetCreateCourseDemandQuery query,
            GetCreateCourseDemandResponse response,
            [Frozen] Mock <IDemandService> service,
            GetCreateCourseDemandQueryHandler handler)
        {
            //Arrange
            service.Setup(x => x.GetCachedCourseDemand(query.CreateDemandId.Value)).ReturnsAsync((CourseDemandRequest)null);
            service.Setup(x => x.GetCreateCourseDemand(query.TrainingCourseId, ""))
            .ReturnsAsync(response);

            //Act
            var actual = await handler.Handle(query, CancellationToken.None);

            //Assert
            actual.CourseDemand.Course.Should().BeEquivalentTo(response.Course);
        }