A. Use try/catch within the unit test to catch the exception.
B. Use the finally bloc within the unit test to populate the exception.
C. Use the database methods with all or none set to FALSE.
D. Use Test.isRunningTest() within the custom controller.

Suggest answer: A

Reference:

No comments:

Please share to make the community better.