The Mockito documentation snippet to configure inline mocking references the java agent with an absolute path in the JVM arguments ([there](https://github.com/mockito/mockito/blob/c81be5deedfd966bd17c9619769a34c74d9779e6/mockito-core/src/main/java/org/mockito/Mockito.java#L194)). This actually breaks relocatability as described [in the Gradle documentation](https://docs.gradle.org/current/userguide/build_cache_concepts.html#relocatability) in the Gradle documentation. [The recommended approach](https://docs.gradle.org/current/userguide/caching_java_projects.html#dealing_with_file_paths) is to use a `CommandLineArgumentProvider`