正解:C
The TestVisible annotation allows test methods to access private or protected members of another class outside the test class. This way, the developer can write unit tests for a private method in an Apex class without changing the access modifier of the method. The SeeAllData annotation allows test methods to access all data in the organization, including records that are normally hidden from test methods. This is not related to testing private methods. Adding a test method in the Apex class is not a good practice, as it mixes production and test code in the same class. Marking the Apex class as global makes it accessible by any Apex code that has access to the class, not just test methods. This can expose the class to unwanted modifications or invocations. References:
* Apex Developer Guide: Isolation of Test Data from Organization Data in Unit Tests, page 1
* Apex Developer Guide: Testing Best Practices, page 1
* Apex Developer Guide: Annotation TestVisible, page 1
* [Trailhead: Platform Developer I Certification Study Guide: Apex Testing], unit 6