_ MOCKING WITH MOCKITO

Learn Mockito|

Enhance your unit tests through practical mocking with Mockito

Unit testing is an essential practice in development that ensures the individual components of an application work as expected. To test these components in isolation, we need to simulate or mock the external services they rely on.

Mockito stands out among mocking libraries for Java, due to huge popularity and adoption and its simple and intuitive API, while also having a very robust set of features.

Mocking icon
Mocking
Stubbing icon
Stubbing
Verification icon
Verification
Mockito illustration
>_

Course Outline

~ 6.5 HOURS
01
Module 1 icon

Introduction to Unit Testing and Mockito

6 LESSONS • ~ 3.5 HOURS
1. Introduction to Unit Testing and Mocking Concepts
2. The Project We’re Testing
3. The Basics of Creating and Managing Mock Objects
4. Creating Mock Objects Using Annotations
5. Stubbing Methods for Controlled Behavior
6. Verifying Interactions with Mocks
02
Module 2 icon

Advanced Mockito Techniques

5 LESSONS • ~ 2 HOURS
1. Working With Spies and Partial Mocks
2. Advanced Stubbing Techniques
3. Exception Handling in Unit Tests
4. Advanced Cases
5. Integrating Mockito with Spring Boot (upcoming)
03
Module 3 icon

Testing Practices and Methodologies

2 LESSONS • ~ 1 HOUR
1. Behavior-Driven Development (BDD) with Mockito
2. Common Pitfalls with Mockito
Baeldung All Access Crown Icon

Access this course through Baeldung All Access

Our Full Course Library icon Our Full Course Library
IntelliJ Idea Ultimate (6 months free) icon IntelliJ Idea Ultimate (6 months free)
JProfiler (6 months free) icon JProfiler (6 months free)
Roadmap icon All Upcoming Courses (Roadmap)
Certificates of Completion icon Certificates of Completion
Multiple-Choice questions icon Multiple-Choice questions in Each Lesson
Pro Access icon Pro Access
Explore All Access Yearly or the Lifetime access

Do you have a team who would benefit from taking the course?

Here are our team licenses →
100% Money Back Guarantee Badge

20-Day Money Back Guarantee

I believe strongly in the quality of the course material to teach you the fundamentals of the library. I've put a lot of work and care into the material and hope you're going to use it and to develop and maintain your applications.

I confidently back all courses with a 20-Day Money Back Guarantee. I want you to dive in deep and experience the full wealth of this resource without hesitation.

If the material isn't a good fit, just contact me within 20 days of purchase and ask for a full refund for any single course package.