public async Task WhenEmptyResponse_GivesEmptyResult() { // Arrange var requestUri = string.Empty; Owner expectedResponse = null; var mockHandler = new Mock <IHttpClientHandler>(); mockHandler.SetupGetStringAsync(requestUri, "", HttpStatusCode.OK); var ownerService = new OwnerService(mockHandler.Object); // Act var result = await ownerService.GetOwnerFromUrlAsync(requestUri, CancellationToken.None); // Assert Assert.AreEqual(expectedResponse, result); }