Reference
Guides
Standing answers to the questions that come up when you test code that calls third-party APIs.
Mocking vs. Stubbing
Mock vs. Stub: What's the Difference?
A stub answers. A mock checks. Here is the difference in one table, the code for each, and how to choose when the thing you are replacing is a third-party API.