Hi,
tl;tr
We have an issue in the code internally the verification mode you are using use a JUnit class, that is not on the classpath. => Adding JUnit in the dependency of your POM will fix things.
Thanks for reporting. I’ve created an issue on GitHub (#152)
long story
For some reason TestNG 5.xxx make the JVM fail with a VerifyError, on a method that is not even called at that point.
java.lang.VerifyError: (class: org/mockito/internal/verification/VerificationOverTimeImpl, method: verify signature:
(Lorg/mockito/internal/verification/api/VerificationData;)V) Incompatible argument to function
But switching to the latest version of TestNG, 6.8.something make the JVM fail with the real cause : NoClassDefFoundError
java.lang.NoClassDefFoundError: junit/framework/ComparisonFailure
Which is the real issue here, now there’s only to find which class depends on JUnit. This class is ArgumentsAreDifferent which extends ComparisonFailure, this exception appears in a try/catch block in VerificationOverTimeImpl that is needed for the timeout verification.
This issue has been there probably since 1.10.x when fixing some timeout issues.
Note I copied this answer on SO as well.