public static ApiClientCoreWithCache CreateErrorMockApiClientCoreWithCache(string apiKey)
        {
            var clientCore  = new ErrorMockApiClientCore(apiKey);
            var cacheHelper = CreateCheHelperForTest();

            return(ApiClientCoreWithCache.Create(clientCore, cacheHelper));
        }
        public void GetExceptionTest()
        {
            var           mockApiClientCore = new ErrorMockApiClientCore("dummy");
            var           client            = ApiClientCoreWithCache.Create(mockApiClientCore, cacheHelper);
            ApiGetRequest request           = new ApiGetRequest("dummy endpoint", new Dictionary <string, string>());

            Assert.ThrowsException <BuffettCodeApiClientException>(() => client.Get(request, false, false));
        }