public void GetProvidersByFrameworkIdShouldLogWhenInvalidStatusCode()
        {
            var searchResponse = new Mock <ISearchResponse <FrameworkProviderSearchResultsItem> >();
            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 <FrameworkProviderSearchResultsItem>, 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.GetProvidersByFrameworkId(string.Empty));

            _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);
        }