Service tests used Mockito to check that a matching advice posts once and that a mismatch, an unknown invoice, or a zero amount does not persist. Strict stubs allowed an unused collaborator without failing the run, and direct verification covered the repository.
- What worked
- Stubbing and verification matched the reject-before-write cases on the first green run, including normalized keys and credit-note signs.