[Tests] Mocked the http client for testing api requests correctness