What is the optimal way to fix this?
Refer to the test method below:

An external system with Account information and sets the Account’s Integration-Updated___ c checkbox to True when it completes.
The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts."
What is the optimal way to fix this?
A . Add if (‘Test.isRunningTest I)) around calloutUtil.sendAccountUpdate.
B. Add Test.startTest ()before and Test.stopTest () after CallcutoutUtil. sendAccoutUpdate.
C. Add Test.startTest before and Test.setMock and Test. stoptest () after CallloutUtil.sendAccountUpdate.
D. Add Test.startTest() and Test .setMock before and Test.stopTest () after CalloutUtil.sendAccountUpdate.
Answer: D
Latest PDII Practice Questions with 280 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations