1. Salesforce Apex Developer Guide
"Setting Record Creation Dates in Tests": "To be able to test triggers that are dependent on the CreatedDate field
you can set this field in test methods... Use the Test.setCreatedDate method to set the CreatedDate for a test record." This directly supports option D.
2. Salesforce Apex Developer Guide
"Testing HTTP Callouts": "By default
test methods can’t make callouts to external web services... To prevent tests from failing and to increase code coverage
you can use mock callouts." This invalidates option C.
3. Salesforce Visualforce Developer Guide
"PageReference Class": Under the getContentAsPDF() method documentation
it states: "This method can’t be used in test methods. Instead
test the controller method that returns the PageReference and verify that the page reference isn’t null." This invalidates option B.
4. Salesforce Apex Developer Guide
"Executing Anonymous Apex Code": This section describes how anonymous Apex is executed through the Developer Console
Execute Anonymous tool
or API
which are distinct from the unit test execution context. The guide's section on "Running Tests as Another User" specifies using System.runAs for this purpose within a test
invalidating the premise of option A.