Polishing the test case, and enhancing the http client impl