Jacoco does not cover tests using @PrepareForTest(Class.class).
I need to use PowerMockito whenNew method, but it does not work without the PrepareForTest annotation.
Is there any workaround for this issue?
JaCoCo could work in two mods:
If you'd like to collect coverage from PowerMock test then you should use offline instrumentation.
Here working example for Gradle: https://github.com/SurpSG/jacoco-offline-instrumentation