Question 560
A Copilot-assisted software team encounters the following situation: A backend team needs a safe mock for an external payment processor. Which approach targets the actual problem most precisely?
Explanation
Correct Answer
Sensitive transactional mocks need deterministic semantics and idempotency checks so AI-generated tests cannot accidentally transact against production. The proposed action directly addresses the identified need: A backend team needs a safe mock for an external payment processor. A suitable acceptance check is: Each scripted case reproduces locally, a duplicate callback causes no second charge, and the test environment makes no network call to production payment services.
Incorrect Answers
A generic explanation ignored language-version differences. The specific problem here is that generated mocks accidentally depended on production credentials or services.
Debugging additions printed sensitive payloads or lacked failure coverage. The specific problem here is that generated mocks accidentally depended on production credentials or services.
Generated tests omitted authorization-denial paths. The specific problem here is that generated mocks accidentally depended on production credentials or services.