add unit test for httpserver
improve tests for httpclient