ARTICLE AD BOX
I recently upgraded to jdk21 and a test started failing on this line:
verify(this.myService, times(2)).myMethod(myCaptor.capture());The issue seems to be the use of a capture. If I remove it (replace with 'any()' for example), the test passes. If I remove the 'times(2)', the test also passes (though there's only a single value in the capture list).
2
