What is the optimal way to fix this?

The test method above calls a web service that updates 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 Test.startTest() before and Test.setMock and Test.stopTest() after CalloutUtil.sendAccountUpdate.
B . Add Test.startTest() and Test.setMock before and Test.stopTest() after CalloutUtil.sendAccountUpdate.
C . Add if (!Test.isRunningTest()) around CalloutUtil.sendAccountUpdate.
D . Add Test.startTest() before and Test.stopTest() after CalloutUtil.sendAccountUpdate.

Answer: B

Latest PDII Dumps Valid Version with 280 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments