public async Task IsRetriableResponse_UnparseableResponse()
        {
            var response = new HttpResponseMessage();

            response.Content = new StringContent("This isn't JSON");
            Assert.False(await RetryHandler.IsRetriableResponse(response));
        }
        private async Task AssertRetriable(bool expectedRetriable, StandardResponse <object> standardResponse)
        {
            string json         = NewtonsoftJsonSerializer.Instance.Serialize(standardResponse);
            var    httpResponse = new HttpResponseMessage {
                Content = new StringContent(json)
            };
            var actual = await RetryHandler.IsRetriableResponse(httpResponse);

            Assert.Equal(expectedRetriable, actual);
        }
        public async Task IsRetriableResponse_BadGateway()
        {
            var httpResponse = new HttpResponseMessage
            {
                StatusCode = HttpStatusCode.BadGateway,
                Content    = new StringContent("No JSON returned")
            };
            var actual = await RetryHandler.IsRetriableResponse(httpResponse);

            Assert.True(actual);
        }