Question 126
A developer created an Apex class that makes outbound RESTful callout. The following was created to send a fake response in Apex test methods.
Which method can be called to return this fake response in the test methods?
Question 127
global with sharing class MyRemoter {
public String accountName { get; set; }
public static Account account { get; set; }
public AccountRemoter() {}
@RemoteAction
global static Account getAccount(String accountName) {
account = [SELECT Id, Name, NumberOfEmployees
FROM Account WHERE Name = :accountName];
return account;
}
}
Consider the Apex class above that defines a RemoteAction used on a Visualforce search page.
Which code snippet will assert that the remote action returned the correct Account?
Account a = controller.getAccount('TestAccount');
Question 128
A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of all the test data that is needed to perform the tests.
What should the developer do to speed up test execution?
Question 129
A developer sees test failures in the sandbox but not in production. No code or metadata changes have been actively made to either environment since the sandbox was created.
Which consideration should be checked to resolve the issue?
Question 130
A developer must create a way for external partners to submit millions of leads into Salesforce per day. How should the developer meet this requirement?
