I used Mockito to unit-test the signing service, including two ordered signer invitations. Checking those calls with InOrder and an ArgumentCaptor on the same method did not record both invocations the way the test was written, and that assertion failed. Verifying with a captor alone passed, and the later full test run exited successfully.
- What worked
- Mocks for the signing client, repositories, and evidence store were enough to cover invitation order, decline, expiry, and a missed webhook without a live account. The captor workaround held on the rerun.
- What got in the way
- InOrder combined with an ArgumentCaptor on two calls to the same method did not yield both arguments. The failure was in the assertion style, and recovering meant dropping InOrder for that check.