Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
WARNING: A Java agent has been loaded dynamically (/var/folders/4p/.../byteBuddyAgent...jar)
WARNING: Dynamic loading of agents will be disallowed by default in a future release
To ensure tests do not break when upgrading to future JDK releases where dynamic agent loading is disallowed by default, Mockito should be explicitly configured as a -javaagent in the test JVM arguments, or dynamic agent loading should be explicitly enabled.
When running Android engine Robolectric tests (e.g.,
./flutter/testing/run_tests.py --type java), Mockito emits deprecation warnings when self-attaching theinline-mock-makeragent on newer JDK releases (JDK 21+):To ensure tests do not break when upgrading to future JDK releases where dynamic agent loading is disallowed by default, Mockito should be explicitly configured as a
-javaagentin the test JVM arguments, or dynamic agent loading should be explicitly enabled.Code Links: