Stub
In plain terms
A simplified stand-in returning canned responses in tests.
Going deeper
A stub replaces a real dependency with predefined responses so tests can run in isolation without real services. It feeds fixed data to the code under test.
Under the hood
Provides state (canned returns) rather than verifying interactions, unlike mocks.
Examples
Faking API responses, isolating units, test doubles, deterministic tests.
Think of it like...
Like a cardboard cutout that always gives the same scripted line.