79345805

Date: 2025-01-10 13:14:49
Score: 2
Natty:
Report link

Surefire was incorrectly marking many tests as failed, including those provided as examples, even though they were actually functioning correctly. This explains why running the tests with -Dtest revealed no errors.

Upon closer inspection of the Mockito logs located just below the error messages in Surefire, I discovered that the issue was related to entirely different classes. The problem was ultimately resolved by adding @ExtendWith(MockitoExtension.class) before the class declarations.

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: DocOrox