💬 In plain words: Apex tests cannot make real callouts to external systems. Instead of hitting a live endpoint, you hand your test a "fake phone." Using HttpCalloutMock , you return a scripted response that you control. You use the exact same strategy for internal code dependencies using StubProvider . You are testing your own logic, not the uptime of an external system.
Salesforce Basics