Mockito Fails In 2019.1 EAP


I have a project that uses mockito as a transitive test dependency but also injects another Java Agent on the fly (using com.ea.agentloader.AgentLoader).

When I run the test with 2018.3.4 it all runs fine.

When I run the test with 2019.1 the test does not run and errors with:

java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker

Caused by: java.lang.IllegalStateException: Failed to load interface org.mockito.plugins.MockMaker implementation declared in sun.misc.CompoundEnumeration@52b77d5e
at org.mockito.internal.configuration.plugins.PluginInitializer.loadImpl(
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(
at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(
at org.mockito.internal.configuration.plugins.Plugins.<clinit>(
at org.mockito.internal.util.MockUtil.<clinit>(
... 42 more
Caused by: org.mockito.exceptions.base.MockitoInitializationException:
Could not initialize inline Byte Buddy mock maker. (This mock maker is not supported on Android.)

There is a somewhat related issue here that seems to think IDEA is doing something to cause the issue. 

IntelliJ IDEA 2018.3.4 (Community Edition)
Build #IC-183.5429.30, built on January 29, 2019
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.18.0-15-generic

IntelliJ IDEA 2019.1 EAP (Ultimate Edition)
Build #IU-191.5701.16, built on February 20, 2019
IntelliJ IDEA EAP User
Expiration date: March 22, 2019
JRE: 1.8.0_202-release-1483-b4 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.18.0-15-generic



1 comment
Comment actions Permalink

Please report at with the reproducible test case.


Please sign in to leave a comment.