At the time of this writing, there is no official JUnit 5 extension to use Mockito in Jupiter tests. Nevertheless, the JUnit 5 team provides a simple ready to use Java class implementing a simple but effective extension for Mockito. This class can be found in the JUnit 5 user guide (http://junit.org/junit5/docs/current/user-guide/), and its code is the following:
import static org.mockito.Mockito.mock;import java.lang.reflect.Parameter;import org.junit.jupiter.api.extension.ExtensionContext;import org.junit.jupiter.api.extension.ExtensionContext.Namespace;import org.junit.jupiter.api.extension.ExtensionContext.Store;import org.junit.jupiter.api.extension.ParameterContext;import org.junit.jupiter.api.extension.ParameterResolver; ...