Mockito Fails In 2019.1 EAP

Answered

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(PluginInitializer.java:54)
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:57)
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:44)
at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:21)
at org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:18)
at org.mockito.internal.util.MockUtil.<clinit>(MockUtil.java:24)
... 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.

https://github.com/raphw/byte-buddy/issues/532 

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

 

 

Please sign in to leave a comment.