I started by refactoring to create a dependency injection seam [63797de]. The idea was to inject an
HttpClient mock that would allow me to inspect the resulting argument to its
execute() method in
retrieve-Response(). To that end, I elevated the
HttpClient instance to a class field initialized in the default constructor, which I now needed to make explicit. I then factored out a constructor that took an
HttpClient instance as an argument and reworked the default constructor to chain to the new one, passing a fresh instance.
In writing the test to exploit the seam, I discovered that many of the methods of
AbstractHttpClient, including the single-argument version of
execute() that the code uses, are final, preventing ...