TestHTTPHandler code was duplicated

The methods in TestHTTPHandler and TestHTTPHandler2 were exactly same.