Disclosure: when you buy through links on our site, we may earn an affiliate commission.

Mockito: Unit testing in Java

Learn to better unit test your Java methods, using the powerful Mockito framework
(8 reviews)
33 students
Created by


CourseMarks Score®







Platform: Udemy
Video: 1h 37m
Language: English
Next start: On Demand

Table of contents


Hello and welcome to The complete 2021 course on the latest Mockito framework iteration out there.
In this course we are going to start from zero and first of all set up our environment in order to write Java code and furthermore unit-test our methods using this framework.
I will then introduce the theory behind mocking and the different types of mocks there are. This way, we can better understand how and why is this process useful to us, not just as independent programmers or freelancers but also constituting a huge advantage on your CV and an important thing to know the ins and outs about.
Furthermore we are going to dive deep straight into the code to get you started as quickly as possible. I’ll use an example of a simple, but practical Java project to show you a variety of mocking techniques. You’ll also learn the best practices and coding standards for unit tests based on my developing experience.
Writing Great Unit Tests distinguishes Good Programmers from Great Programmers. In this course, you will learn how to Write Great Java Unit Tests with Mockito and JUnit.
According to statistics, about 67% out of all the Java developers use Mockito when they write tests for their Java applications. It’s a basic skill required by most employees, so if you want to start your Java Developer career or take it to another level, you’ll have to write unit tests. With Mockito, you’ll write them better and faster.
So with all that being said, start learning this in-demand framework now, by hitting the Enroll Button!

You will learn

✓ Learn the latest Mockito 3 version
✓ Write better Java JUnit tests with the help of Mocks
✓ Understand what is mocking and how is it useful
✓ Learn about stubbing
✓ Understand argument matchers
✓ Learn about adding and verifying behavior on mocked objects
✓ Learn about Mockito Spies


• Maybe have some basic Java programming skills
• A computer and an internet conneciton

This course is for

• Students who want to prepare for their first IT job
• Developers who know Mockito 1 or 2 but want to learn Mockito 3
• Java passionates who want to write better tests
• Anyone interested about mocks and unit-testing
Software Engineer, Computer Science BSc
Hi, I am Alex! I am an experienced software engineer, with a bachelor’s degree in computer science, that currently makes a living developing software. My passion for writing code pushed me to work with companies from multiple countries as an employee. I also have some freelance experience, being fluent in various programming languages.
Platform: Udemy
Video: 1h 37m
Language: English
Next start: On Demand

Students are also interested in