Modify API tests to check the calls

Since often mocked response is returned untouched by the tested
function, we need to check not only that it returns the proper
response, but also that it makes a right request too.

Change-Id: I87bf79d9c8648f8377c0c27b1cd4992a6e5af598
Closes-Bug: #1288169