Gotchas

For Jacoco version 0.7.9 and the Powermock Version 1.7.0 and below Exclude any classes under test from being included in the PrepareForTest annotation in the Test Class.

This is because the Reporting Analyzer is not able to match the code executed with the original class code, reason being PowerMock like other mock frameworks modify the bytes of class under test. Thus no coverage for the class will show.

You can read more on this known issue here and here

The root cause of the issue appears to be that PowerMock relies on Javassist behaviour for instrumentation of the classes under test. There are plans however to refactor Powermock such that one of the major changes in Version 2.0 will be replacing javaassist with byte-buddy. You can follow more on this here