QuestionQ59

VerifiedTesting

Which two statements correctly explain why Mock objects are necessary when writing test classes?

Choose two
Explanation

Mocks isolate the code being tested by substituting controlled behavior for dependent objects, methods, state, or external services. Apex tests that execute HTTP callout code must provide a mock response rather than make an actual external request.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!