unit testing http client factory