public void GetProviderByUkprnListShouldLogWhenInvalidStatusCode()
        {
            var searchResponse = new Mock <ISearchResponse <Provider> >();
            var apiCall        = new Mock <IApiCallDetails>();

            apiCall.SetupGet(x => x.HttpStatusCode).Returns((int)HttpStatusCode.Ambiguous);
            searchResponse.SetupGet(x => x.ApiCall).Returns(apiCall.Object);

            _elasticClient.Setup(x => x.Search(It.IsAny <Func <SearchDescriptor <Provider>, ISearchRequest> >(), It.IsAny <string>())).Returns(searchResponse.Object);
            var repo = new ProviderRepository(
                _elasticClient.Object,
                _log.Object,
                Mock.Of <IConfigurationSettings>(),
                Mock.Of <IProviderLocationSearchProvider>(),
                Mock.Of <IProviderMapping>(),
                _queryHelper.Object,
                _mockActiveFrameworkChecker.Object,
                _mockPaginationHelper.Object);

            Assert.Throws <ApplicationException>(() => repo.GetProviderByUkprnList(new List <long> {
                1L
            }));

            _log.Verify(x => x.Log(Microsoft.Extensions.Logging.LogLevel.Warning, It.IsAny <EventId>(), It.IsAny <FormattedLogValues>(), It.IsAny <Exception>(), It.IsAny <Func <object, Exception, string> >()), Times.Once);
        }