A practical guide to unit testing an ASP.NET controller action method that depends on HttpClient. Since there is no IHttpClient interface to mock directly, the approach involves mocking HttpMessageHandler and passing it to the HttpClient constructor. The post includes a complete code example using Moq and xUnit, showing how to set up the mock to return a predefined JSON response and then assert on the controller's action result.