Interview frequency: …
Short answer
A test double replaces a dependency; a fake is a simple working implementation, a stub returns fixed answers, and a mock verifies expected interactions.
Explanation
Choose the simplest double that proves the required behavior. A fake repository is often sturdier than expecting dozens of calls, and a mock is useful when the interaction itself is an important contract; do not test details that do not matter to the user.
Common mistakes
- Mocking every dependency until refactoring becomes impossible.
- Using a fake that does not resemble the real failure modes when they are needed.