In this article, we will see JUnit and Mockito in action using 2 Java components, a service class, and a repository class.

We will start by creating the classes and then write tests in different ways to use concepts like, assert, verify, check for thrown exception, ArgumentMatcher, and ArgumentCaptor. At…

Gabriel N. Voicu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store