Book Image

Master Java Unit Testing with Spring Boot and Mockito [Video]

By : In28Minutes Official
Book Image

Master Java Unit Testing with Spring Boot and Mockito [Video]

By: In28Minutes Official

Overview of this book

Spring Boot is the most popular framework to develop RESTful services. It has awesome unit testing capabilities through the Spring Boot Starter Test. Mockito is the most popular mocking framework. JUnit is the most popular Java unit testing framework. 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 the Spring Boot and Mockito frameworks. You will be using Spring (dependency management), Spring Boot, Maven (dependency 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 the Spring Boot Starter Test: JUnit, Spring Test, Spring Boot Test, AssertJ, Hamcrest, Mockito, JSONassert, and JSONPath. You will also learn how to use the most important unit testing annotations: @RunWith(SpringRunner.class), @SpringBootTest, @WebMvcTest, @DataJpaTest, and @MockBean. By the end of this course, you will be able to write awesome unit tests for your RESTful services. The code files and resource files are uploaded on the GitHub repository at https://github.com/packtpublishing/master-java-unit-testing-with-spring-boot-and-mockito
Table of Contents (4 chapters)
Free Chapter
1
Introduction
3
Unit Testing with Spring Boot and Mockito
4
Congratulations
Chapter 2
Mocking with Mockito
Content Locked
Section 10
Step 09 - Mockito Tips - Multiple Return Values and Specific Argument Matchers
This video explores Mockito tips on multiple return values and specific argument matchers.