Refactored initialisation of HTTP client and one more passing test