Test Double
You might say
When testing an order failure message, use a controllable payment test double that returns “payment rejected” instead of depending on the real payment service every time.
A test double is a controllable object that replaces a real dependency during testing.When an order module requests payment, a double can reliably return success, rejection, or timeout so tests verify how the page handles each. Mock, stub, fake, and spy can be different kinds of test double; not every double is simply a Mock, and it cannot prove a real service is connected.
Also calledTest DoubleMockStubFakeSpy
Further reading