Use mock to test http request