maxAttempts as a private static variable on a helper class. A static variable in Apex is initialized only once per transaction and its value is shared across all trigger executions within that same transaction, making it ideal for preserving state and controlling behavior such as recursion or retry limits. By placing maxAttempts in a helper class as a private static variable, the developer ensures that the value remains available and unchanged throughout the transaction while being accessible to all trigger invocations. For example:@future(callout=true) executes whenever the Opportunity is updated, not specifically when the user clicks the custom button. This does not satisfy the requirement of triggering the callout directly from the button press.
A developer is asked to write helper methods that create test data for unit tests.

What should be changed in the Testutils class so that its methods are only usable by unit test
methods?

TestUtils class are only available to unit test code, the entire class should be marked with the @isTest annotation by adding it above line 01. In Apex, classes annotated with @isTest are excluded from the organization's code size limit and can only be referenced by test methods, making them ideal for utility classes that create test data or provide helper functionality for tests. Placing @isTest above the createAccount() method (Option A) would be invalid because the annotation applies to classes or test methods, not helper methods like this one. Changing the class to private (Option C) would only restrict visibility within the same class and would not make it test-only. Removing static from the method (Option D) would simply require an instance of the class to call the method and would not restrict its usage to test code. Therefore, the best solution is to annotate the entire class with Security.stripInaccessible() to automatically remove fields that the current user does not have permission to access before returning the data to the Lightning Web Component. This ensures that Sales Representatives receive the Commission field while Sales Assistants do not, and no exceptions are thrown. Option A (WITH SECURITY_ENFORCED) would throw a runtime exception if the query includes a field the user cannot access, causing errors rather than gracefully hiding the field. Option C is incorrect because Lightning Locker Service provides client-side security isolation, not field-level security enforcement. Option D (Lightning Data Service) respects CRUD and FLS but does not provide the same server-side filtering control needed when retrieving collections through Apex. Therefore, Security.stripInaccessible() is the best solution for enforcing field-level security while avoiding errors.