All my tests are running fine with "mvn test" command. However when I'm using eclipse IDE to run tests, it no longer works. I got this exception error :
org.powermock.reflect.exceptions.FieldNotFoundException: No instance field named "reporter" could be found in the class hierarchy of org.mockito.internal.MockitoCore.
at org.powermock.reflect.internal.matcherstrategies.FieldNameMatcherStrategy.notFound(FieldNameMatcherStrategy.java:40)
at org.powermock.reflect.internal.WhiteboxImpl.findSingleFieldUsingStrategy(WhiteboxImpl.java:501)
at org.powermock.reflect.internal.WhiteboxImpl.findFieldInHierarchy(WhiteboxImpl.java:454)
at org.powermock.reflect.internal.WhiteboxImpl.findFieldInHierarchy(WhiteboxImpl.java:442)
I already read some topics about that. It seems it is due to some junit/powermock versions compatibility : Unable to run JUnit test with PowerMockRunner
But I think my versions are correct :
<junit.version>4.12</junit.version>
<powermock.version>1.7.3</powermock.version>