
Master Java Unit Testing with Spring Boot & Mockito
Learn to write awesome Java JUnit unit tests with Spring Boot, Mockito, JsonAssert, Hamcrest & JsonPath in 40 easy steps
What you'll learn
Requirements
- You have an attitude to learn while having fun :)
- You should have working knowledge of Java, Junit, Spring, Spring Boot and JPA/Hibernate.
- We will help you install Eclipse and get up and running with Maven and Tomcat.
About this course
Spring Boot is the most popular framework to develop RESTful Services. It has Awesome Unit Testing capabilities through Spring Boot Starter Test. Mockito is the most popular mocking framework. JUnit is most popular Java Unit Testing Framework.
In this course, you will learn to Write Great Unit Tests for Simple RESTful Services with Spring Boot Starter Test, Mockito and JUnit. You will learn to write independent unit tests for RESTful web services talking with multiple layers - web, business and data. You will learn how to write integration tests using an in memory database H2.
You will build the unit tests step by step - in 40 easy steps. This course would be a perfect first step as an introduction to unit testing with Spring Boot and Mockito Frameworks.
You will be using Spring (Dependency Management), Spring Boot, Maven (dependencies management), Eclipse (IDE), in memory database H2 and Tomcat Embedded Web Server. We will help you set up each one of these.
You will use all the frameworks that are part of Spring Boot Starter Test - JUnit, Spring Test, Spring Boot Test, AssertJ, Hamcrest, Mockito, JSONassert and JsonPath.
You will learn to use the most important Unit Testing Annotations - @RunWith(SpringRunner.class), @SpringBootTest, @WebMvcTest, @DataJpaTest and @MockBean.
COURSE HIGHLIGHTS
Section 1 - Learning Mocking with Mockito
Step 01: Setting up the project using Spring Initializr
Step 02: Writing Unit Test for a Simple Business Service
Step 03: Setting up a Business Service to call a Data Service
Step 04: Writing your first unit test with Stub
Exercise - Update Tests 2 & 3
Step 05: Exercise Solution - Updating Tests 2 & 3 to use Stubs - Problem with Stubs.
Step 06: Writing Unit Tests with Mocking using Mockito
Exercise - Updating Tests 2 & 3 to use Mockito
Step 07: Exercise Solution - Updating Tests 2 & 3 to use Mockito
Step 08: More Refactoring - @Mock, @InjectMocks and @RunWith(MockitoJUnitRunner.class)
Step 09: Mockito Tips - Multiple Return Values and Specific Argument Matchers
Step 10: Mockito Tips - Argument Matchers
Step 11: Mockito Tips - Verify method calls
Step 12: Mockito Tips - Argument Capture
Step 13: Mockito Tips - Argument Capture on Multiple Calls
Step 14: Introduction to Spy
Step 15: Mockito FAQ
Section 2 - Unit Testing RESTful Services with Spring Boot and Mockito
Step 01: Creating a Hello World Controller
Step 02: Using Mock Mvc to test Hello World Controller
Step 03: Using Response Matchers to check status and content
Step 04: Creating a Basic REST Service in Item Controller
Step 05: Unit Testing Item Controller and Basic JSON Assertions
Step 06: Digging deeper into JSON Assert
Step 07: Writing a REST Service talking to Business Layer
Step 08: Writing Unit Test for REST Service mocking Business Layer
Step 09: Prepare Data Layers with JPA, Hibernate and H2
Step 10: Create Item Entity and Populate data with data.sql
Step 11: Create a RESTful Service talking to the database
Step 12: Writing Unit Test for Web Layer - Controller - Using Mock MVC
Step 13: Exercise & Solution - Writing Unit Test for Business Layer - Mocking
Step 14: Writing Unit Test for Data Layer - Data JPA Test
Step 15: Writing an Integration Test using @SpringBootTest
Step 16: Tip : Using @MockBean to mock out dependencies you do not want to talk to!
Step 17: Tip : Creating Different Test Configuration
Step 18: Writing Unit Tests for Other Request Methods
Step 19: Refactor SomeBusinessImpl to use Functional Programming
Step 20: Better Assertions with Hamcrest - HamcrestMatcherTest
Step 21: Better Assertions with AssertJ - AssertJTest
Step 22: Better Assertions with JSONPath - JSONPathTest
Step 23: Easier Static Imports
Step 24: Tip : Measuring Test Coverage with Eclipse
Step 25: Tip : Keep an eye on performance of unit tests!
Step 26: Good Unit Tests
Start Learning Now. Hit the Enroll Button!
Related coupons

![[NEW] Cloud & DevOps Interview Guide - AWS, Azure & GCP](https://img-c.udemycdn.com/course/480x270/6704661_6d21_2.jpg)
[NEW] Cloud & DevOps Interview Guide - AWS, Azure & GCP

Learn Apache Camel Framework with Spring Boot

Learn Java Functional Programming with Lambdas & Streams
Udemy Course Reviews
Udemy Coupon Insights for Master Java Unit Testing with Spring Boot & Mockito
This Udemy coupon unlocks a guided path into Master Java Unit Testing with Spring Boot & Mockito, so you know exactly what outcomes to expect before you even press play.
in28Minutes Official leads this Udemy course in Development, blending real project wins with step-by-step coaching.
The modules are sequenced to unpack Unit Testing step by step, blending theory with scenarios you can reuse at work while keeping the Udemy course reviews tone in mind.
Video walkthroughs sit alongside quick-reference sheets, checklists, and practice prompts that make it easy to translate the material into real projects, especially when you grab Udemy discounts like this one.
Because everything lives on Udemy, you can move at your own pace, revisit lectures from any device, and pick the payment setup that fits your budgetβideal for stacking extra Udemy coupon savings.
in28Minutes Official also keeps an eye on the Q&A and steps in quickly when you need clarity. You'll find fellow learners trading tips, keeping you motivated as you sharpen your Development skill set with trusted Udemy discounts.
Ready to dive into Master Java Unit Testing with Spring Boot & Mockito? This deal keeps the momentum high and hands you the tools to apply Unit Testing with confidence while your Udemy coupon is still active.