While implementing a unit test using JMockit with a @Capturing
annotation
and a Verification block for the "captured" variable I have 2 outcomes:
IntelliJ: I can run and debug successfully, validating that the verification behaves correctly.
Executing same test code with command line (cmd) using
mvn test
throws 'Missing invocation'.
It seems @Capturing
behaves like @Mocked
if using the cmd. As it is the exact behavior if I change the @Capturing
to a @Mocked
.
What would be the cause of this?
Settings:
IntelliJ: 2017.3.4
Java 8
JMockit 1.35