Mockito and JUnit 5 – Using ExtendWith 1. Introduction In this quick article, we’ll show how to integrate Mockito with the JUnit 5 extension model. To learn more about the JUnit 5 extension model, have a look at this article. First, we’ll show how to create an extension that automatically creates mock… Continue Reading mockito-junit-5-extension

Mockito ArgumentMatchers 1. Overview This tutorial shows how to use the ArgumentMatcher and how it differs from the ArgumentCaptor. For an introduction to the Mockito framework, please refer to this article. 2. Maven Dependencies We need to add a single artifact: <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>2.21.0</version> <scope>test</scope> </dependency> The latest version of Mockito can be… Continue Reading mockito-argument-matchers