test double
A stand-in implementation that a test controls, such as a fake clock.
A test double (fake, stub, or mock) replaces a real dependency behind an interface so a test can control its behavior.
Examples
A
FakeClockwhose time is always 09:00 on 1 March, so a late-fee test gives the same answer every day.
See also