We have following configuration for our testing environment with 2.5G heap allocation.
The test execution terminates with OOM error along with a huge pile of Metaspace.
powermock: 1.7.1
mockito : 2.0.2-beta
Java 11
On heap dump analysis we see lot of org.powermock.core.classloader.MockClassLoader objects which are not being Garbage Collected and eventually it crashes with OOM.
Heap Dump:

Heap Used:

Metaspace Used:

I see similar Issues reported in past here #227 but can't see any resolution provided.
@johanhaleby Please assist If this is fixed in recent releases or any other workaround.