public async void ThrowsHttpRequestExceptionIfResponseNotSucceed()
            {
                _messageHandlerMock.Protected()
                .Setup <Task <HttpResponseMessage> >("SendAsync", ItExpr.Is <HttpRequestMessage>(m => m == _request), ItExpr.IsAny <CancellationToken>())
                .Returns(Task.FromResult(new HttpResponseMessage(HttpStatusCode.BadGateway)));

                await Assert.ThrowsAsync <HttpRequestException>(() => HttpWebClient.RequestAsync <TestDto>(_request,
                                                                                                           httpClient: new HttpClient(_messageHandlerMock.Object)));
            }
            public async void ReturnsExpectedDto()
            {
                const string expectedValue    = "value";
                var          expectedResponse = $"{{ testProp: '{expectedValue}' }}";

                _messageHandlerMock.Protected()
                .Setup <Task <HttpResponseMessage> >("SendAsync", ItExpr.Is <HttpRequestMessage>(m => m == _request), ItExpr.IsAny <CancellationToken>())
                .Returns(Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)
                {
                    Content = new StringContent(expectedResponse)
                }));

                var result = await HttpWebClient.RequestAsync <TestDto>(_request,
                                                                        httpClient : new HttpClient(_messageHandlerMock.Object));

                Assert.Equal(result.TestProp, expectedValue);
            }