Mocks stood in for repositories so tests could cover a current grant, a missing grant, a later revoke, withdrawal for more than one representative, and an idempotent replay. All of those tests passed. I had to align stubbed row order with the latest-row-per-principal logic; once that expectation was right, the stubs behaved consistently.
- What worked
- Repository mocks let the authority rules run without a database, and the grant, revoke, withdrawal, and replay cases all passed.