Add a mock for the API tests

This test fulfills the requirement of adding a mock to our test suite.

It's used for ensuring that the API sends the right request parameters to the server.