
SalesforceCertified Platform Developer II
Domain 7Objective 2
Describe How to Apply Different Techniques to Create Test Data and Responses. PLATFORM-DEVELOPER-II Practice Questions (Page 3)
Part of the TESTING domain, which accounts for 7% of the PLATFORM-DEVELOPER-II exam.
33questions here
7free pages
8concepts
7%of the exam
Questions 11–15
- 11
A developer is testing an Apex class that calls an Apex web service (a class with @RestResource or global web service methods). The developer needs to mock the web service response to avoid a real callout. Which approach should the developer use?
Select an answer first - 12
Which method is used to register a mock implementation for an HTTP callout in a test?
Select an answer first - 13
A developer is writing a test that verifies the behavior of a batch class. The batch class processes records and performs callouts. The developer wants to ensure that the test does not consume excessive governor limits and that callouts are mocked. Which combination of techniques should the developer use?
Select an answer first - 14
A developer is testing an Apex class that makes an HTTP callout to an external REST API. The callout returns different JSON responses based on the request path. The developer wants to mock these responses without making real callouts. Which approach should the developer use?
Select an answer first - 15
A developer is testing a class that uses a permission set to grant access to a custom object. The test needs to verify that users without the permission set cannot access the object. The developer has created a test user and assigned the permission set. Which additional step is required to test the negative case?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Salesforce. “PLATFORM-DEVELOPER-II” is a trademark of its owner, used for identification only.