I prefer to think of it as testing how you code behaves when the API returns x, y, or z.
It can be a pain to change the mocks and tests when the API changes, but what else can you do - not test this layer of your code?
It can be a pain to change the mocks and tests when the API changes, but what else can you do - not test this layer of your code?
The problem with mocking that I've run into is that you're not really testing expected functionality. You're testing that code calls an API. This sounds good in theory until you need to change the API. Then, you have a whole bunch of tests to clean up.