私も同じ問題を抱えていて、理解するのに少し時間がかかりました。私のセットアップは古いバージョンのjboss.javassistをプルしていたため、奇妙なことにPowerMockRunnerがまったく機能していませんでした。
JUnitとTestNGが混在する環境もあることは注目に値します。私は以前に複数のsurefireプロバイダーを追加するソリューションを試しましたが、それも機能しませんでした(surefire 2.14.1を使用)。surefire 2.17にアップグレードした後、surefireプロバイダーを宣言する必要なしに、JUnitテストとTestNGテストの両方が実行を開始しました。実際、私はグループを使用しているため、JUnitプロバイダーがエラーをスローしました。どうやら、TestNGプロバイダーは自由形式のテキスト(「統合」など)を許可しますが、JUnitプロバイダーはクラスパス(「com.example.UnitTests」など)を期待します。
これが私のプラグインセクションです...
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<groups>spring, unit, integration</groups>
<systemPropertyVariables>
<java.awt.headless>true</java.awt.headless>
<org.apache.activemq.default.directory.prefix>target/test/</org.apache.activemq.default.directory.prefix>
<log4j.configuration>file:${project.basedir}/src/test/resources/log4j.properties</log4j.configuration>
</systemPropertyVariables>
<argLine>${surefire.args}</argLine>
</configuration>
</plugin>
...および関連するテスト部門..。
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<!--
PowerMock versions are compatible with specific Mockito versions.
https://code.google.com/p/powermock/wiki/MockitoUsage13
-->
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.5.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.5.4</version>
<scope>test</scope>
</dependency>
<!-- without this PowerMock tests don't run in maven -->
<dependency>
<groupId>jboss</groupId>
<artifactId>javassist</artifactId>
<version>3.8.0.GA</version>
<scope>test</scope>
</dependency>