Yes, there is a solution for this:
First you will have to add this maven dependency:
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4-rule-agent</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
Then, instead of using this annotation @RunWith(PowerMockRunner.class), just add a @Rule in the Test class like this:
public class Test {
@Rule
public PowerMockRule rule = new PowerMockRule();
you can find more in this blog Make EclEmma test coverage work with PowerMock
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…