public async Task GetListingWithBookingDetail_ExpectListingWithNoBookingSlot()
        {
            // Arrange
            _listingServiceMock.Setup(x => x.GetListingDetail(1)).ReturnsAsync(() => _sampleListing);

            _imageStorageMock.Setup(
                x => x.TransformImageUrls(It.IsAny <List <Image> >(), ImageType.Listing, It.IsAny <IDevice>())).Returns(
                () => new List <Image>
            {
                new Image {
                    Url = "image1NewUrl"
                }
            });

            _bookingServiceMock.Setup(x => x.GetBookingSlotsByListingId(1)).ReturnsAsync(() => null);

            var controller = new ListingController(_listingServiceMock.Object, _mapperMock, _appSettingMock.Object,
                                                   _loggerMock.Object,
                                                   _authorizationServiceMock.Object, _imageServiceMock.Object, _bookingServiceMock.Object, _deviceMock.Object,
                                                   _imageStorageMock.Object);

            // Action
            var result = await controller.GetListingWithBookingDetail(1);

            // Assert
            result.Should().NotBeNull();
            result.Id.Should().Be(1);
            result.Header.Should().Be(_sampleListing.Header);
            result.Description.Should().Be(_sampleListing.Description);
            result.ImageList.Count.Should().Be(_sampleListing.ImageList.Count);
            result.ImageList.FirstOrDefault().Url = "image1NewUrl";
            result.BookingSlots.Count.Should().Be(0);
        }
        public async Task GetListingWithBookingDetail_ExpectException()
        {
            _listingServiceMock.Setup(x => x.GetListingDetail(It.IsAny <int>())).ReturnsAsync(() => null);
            var controller = new ListingController(_listingServiceMock.Object, _mapperMock, _appSettingMock.Object,
                                                   _loggerMock.Object,
                                                   _authorizationServiceMock.Object, _imageServiceMock.Object, _bookingServiceMock.Object, _deviceMock.Object,
                                                   _imageStorageMock.Object);

            // Assert
            var ex = await Assert.ThrowsAsync <ArgumentOutOfRangeException>(async() => await controller.GetListingWithBookingDetail(10000000));

            ex.Message.Should().Be("Can't find listing\r\nParameter name: id");
        }