I'm trying to write a unit test using PowerMockRunner but I got the following error:
java.lang.IllegalStateException: Extension API internal error: org.powermock.api.extension.reporter.MockingFrameworkReporterFactoryImpl could not be located in classpath. at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.getFrameworkReporterFactory(AbstractTestSuiteChunkerImpl.java:190) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.getMockingFrameworkReporter(JUnit4TestSuiteChunkerImpl.java:140) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:119) at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53) at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
I've checked all the dependencies and it's ok, do I need somehthing else?
After posting the question I found the answer, it seems to be a problem with version 1.6.5, it needs an additional dependency, it's described here.
The dependency is powermock-api-mockito-common version 1.6.5, you can either add it to you pom.xml
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito-common</artifactId>
<version>1.6.5</version>
</dependency>
or download the jar