Which two statements are accurate about why Mock objects are needed when writing test classes? (Choose two.)
A. A Mock is needed whenever the code makes an HTTP callout.
B. Some methods are invoking long running processes, using Mock is a shortcut of bypassing the long executions.
C. Using a Mock allows the test class to bypass the dependencies of other objects, methods, state, or behaviors. Therefore, the developer has total control of his own code.
D. Mock can also be used on the classes that extend the batchable interface to bypass the batch jobs.
Answer:B
Which two statements are accurate about why Mock objects are needed when writing test classes? (Choose two.)
A. A Mock is needed whenever the code makes an HTTP callout. B. Some methods are invoking long running processes, using Mock is a shortcut of bypassing the long executions. C. Using a Mock allows the test class to bypass the dependencies of other objects, methods, state, or behaviors. Therefore, the developer has total control of his own code. D. Mock can also be used on the classes that extend the batchable interface to bypass the batch jobs.
Explanation: Explanation/Reference: https://trailhead.salesforce.com/en/content/learn/v/modules/unit-testing-on-the-lightning-platform/ mock-stub-objects