Finalised the client test, added mockery and updated the client itself to fully work with the tests.