Code refactoring in UnitnHttpClient. && Add improved test cases.