Stub Vs Mock Choosing the Right Test Double
Test doubles play an important role in software testing. They are stand-ins for real objects, letting us isolate specific parts of our code and test them in isolation. It’s like having a substitute teacher for your code, but it’s only more hilarious. Though there are numerous kinds of test doubles, the most common include stubs and mocks and both play an important role in behavior verification and state verification during unit testing.
https://kodehash.com/blogs/stub-vs-mock

Stub Vs Mock: Choosing the Right Test Double
kodehash.com

Stub Vs Mock: Choosing the Right Test Double

Knowing the difference between stub vs mock is important for effective testing. Mocks are used to verify interactions between objects.