HOME > Development > Test Java applications with JUnit 5, Mockito, Testcontainers

Test Java applications with JUnit 5, Mockito, Testcontainers

  • Development
  • Apr 25, 2025
SynopsisTest Java applications with JUnit 5, Mockito, Testcontainers,...
Test Java applications with JUnit 5, Mockito, Testcontainers  No.1

Test Java applications with JUnit 5, Mockito, Testcontainers, available at $84.99, has an average rating of 4.6, with 129 lectures, 12 quizzes, based on 1488 reviews, and has 9416 subscribers.

You will learn about JUnit 5 – basic & advanced topics Test Web Layer and Controllers Test Java code with Mockito – the most popular Mocking Framework. Test Data layer and JPA Repositories Write Spring Boot Integration Tests Test Business and Service layer classes Master Test Driven Development (TDD) Perform Integration testing with Testcontainers And more This course is ideal for individuals who are Java developers interested in learning how to test Java applications with JUnit 5 It is particularly useful for Java developers interested in learning how to test Java applications with JUnit 5.

Enroll now: Test Java applications with JUnit 5, Mockito, Testcontainers

Summary

Title: Test Java applications with JUnit 5, Mockito, Testcontainers

Price: $84.99

Average Rating: 4.6

Number of Lectures: 129

Number of Quizzes: 12

Number of Published Lectures: 129

Number of Published Quizzes: 11

Number of Curriculum Items: 141

Number of Published Curriculum Objects: 140

Original Price: $199.99

Quality Status: approved

Status: Live

What You Will Learn

  • JUnit 5 – basic & advanced topics
  • Test Web Layer and Controllers
  • Test Java code with Mockito – the most popular Mocking Framework.
  • Test Data layer and JPA Repositories
  • Write Spring Boot Integration Tests
  • Test Business and Service layer classes
  • Master Test Driven Development (TDD)
  • Perform Integration testing with Testcontainers
  • And more
  • Who Should Attend

  • Java developers interested in learning how to test Java applications with JUnit 5
  • Target Audiences

  • Java developers interested in learning how to test Java applications with JUnit 5
  • Unit Testing is a must-have skill and this video course is about unit testing.

    If you take this video course, you will learn how to test your Java code using JUnit 5 and Mockito framework.

    This video course is for beginners and you do not need to have any prior Unit testing knowledge to enrol in this course.

    JUnit 5 in Different Java projects

    There are different Java projects, build tools and development environments. In this course, you will learn how to create a new project and configure JUnit 5 support for different types of projects, using different development environments and build tools.

    You will learn how to create a Unit test in: 

  • IntelliJ IDEA and

  • Eclipse Development environments.

  • You will learn how to create a Unit test in: 

  • Regular Java project,

  • Maven-based Java project,

  • Cradle-based Java project.

  • Course Overview

    This video course teaches Unit and Integration testing with Java from the very beginning and covers many advanced topics as well. By the end of this course, you will learn:

  • JUnit 5 basics, and

  • JUnit 5 advanced topics.

  • Once you become familiar with JUnit 5, you will learn to use:

  • Test-Driven Development(TDD)

  • You will then learn to use another very popular Test framework for Java called: 

  • Mockito

  • You will also learn how to write:

  • Spring Boot integration tests, and

  • Use Testcontainers to integrate real, containerized services(like databases) into your Java application tests, making sure your test scenarios are realistic without complex setup.

  • By the end of this course you will learn and be able to use all of the following: 

  • Create Unit Tests in IntelliJ,

  • Create Unit Tests in Eclipse,

  • Run unit tests using Gradle,

  • Run Unit Tests using Maven,

  • Use @DisplayName annotation,

  • Use JUnit assertions,

  • Test for Exceptions,

  • Use Lifecycle methods (@BeforeAll, @BeforeEach, @AfterEach, @AfterAll),

  • Run unit tests in any order you need: (Random, Order by Name, Order by Index),

  • Disable Unit test,

  • Repeated Tests with @RepeatedTest annotation,

  • Parameterized tests with @Parameterized annotation

  • @ValueSource,

  • @MethodSource,

  • @CsvSource,

  • @CsvFileSource

  • Change Test Instance lifecycle with @TestInstance (PER_CLASS, PER_METHOD)

  • Learn to Mock objects with Mockito’s @Mock annotation,

  • Learn to user Mockito’s argument matches,

  • Mockito method stubbing,

  • Mockito Exception stubbing,

  • Verify method call,

  • Call Real Method,

  • Do nothing when a method is called,

  • Write integration tests for Spring Boot applications,

  • and more

  • Course Curriculum

    Chapter 1: Introduction

    Lecture 1: Introduction

    Lecture 2: Welcome from the instructor

    Lecture 3: What is a Unit Test?

    Lecture 4: Why write Unit Test?

    Lecture 5: The F.I.R.S.T Principle

    Lecture 6: Testing Code in Isolation

    Lecture 7: Testing Pyramid

    Lecture 8: What is JUnit 5?

    Lecture 9: JUnit and Build Tools

    Chapter 2: Add JUnit 5 to Maven project

    Lecture 1: IntelliJ IDEA Ultimate edition licence

    Lecture 2: Create new Maven project using IntelliJ IDEA

    Lecture 3: Add JUnit Dependencies

    Lecture 4: Maven Surefire Plugin

    Chapter 3: Add JUnit 5 to Gradle project

    Lecture 1: Creating a new project

    Lecture 2: Add JUnit Dependencies

    Lecture 3: Executing Unit Test

    Chapter 4: Add JUnit 5 to a basic Java project

    Lecture 1: Introduction

    Lecture 2: Basic Java project with IntelliJ

    Lecture 3: Basic Java project with Eclipse

    Chapter 5: Basics of JUnit 5

    Lecture 1: Introduction

    Lecture 2: Creating First Unit Test method

    Lecture 3: Assertions and Assertion message

    Lecture 4: Other assertions

    Lecture 5: JUnit Test Exercise

    Lecture 6: Exercise solution overview

    Lecture 7: Lazy Assert Messages

    Lecture 8: Naming Unit Tests

    Lecture 9: @DisplayName annotation

    Lecture 10: Test Method Code Structure. Arrange, Act, Assert.

    Lecture 11: JUnit Test Lifecycle

    Lecture 12: Lifecycle methods demo

    Lecture 13: Disable Unit Test

    Lecture 14: Assert an Exception

    Chapter 6: Advanced JUnit 5

    Lecture 1: @ParameterizedTest. Multiple Parameters with @MethodSource.

    Lecture 2: @ParameterizedTest. Multiple parameters with @CsvSource.

    Lecture 3: @ParameterizedTest + CSV file

    Lecture 4: @ParameterizedTest + @ValueSource annotation.

    Lecture 5: Repeated Tests

    Lecture 6: Methods Order – Random order

    Lecture 7: Methods Order – Order by name

    Lecture 8: Methods Order – Random by order index

    Lecture 9: Order of Unit Test Classes

    Lecture 10: Test Instance Lifecycle – Introduction

    Lecture 11: Changing Test Instance Lifecycle – example 1

    Lecture 12: Test Instance Lifecycle Demo project overview

    Lecture 13: Test Instance Lifecycle Demo Project Implementation

    Chapter 7: Test Driven Development (TDD) in Java

    Lecture 1: Introduction to the Test Driven Development(TDD) in Java

    Lecture 2: New project, Class, Method

    Lecture 3: Creating UserService

    Lecture 4: Test Create User method

    Lecture 5: Test User object contains first name

    Lecture 6: Test Driven Development(TDD) – Refactor Test method

    Lecture 7: Test Driven Development(TDD) – Exercise

    Lecture 8: Test Driven Development(TDD) – Solution overview

    Lecture 9: Check if user id is set

    Lecture 10: Assert throws Exception

    Lecture 11: TDD – Exercise 2

    Chapter 8: Mockito – Create Mocks to test Java code in isolation

    Lecture 1: Introduction to Mockito

    Lecture 2: Adding Mockto to a Java project

    Lecture 3: Method under test overview

    Lecture 4: Implementing UsersRepository

    Lecture 5: Injecting UsersRepository as Dependency

    Lecture 6: Mockito – Creating a Mock object

    Lecture 7: Stubbing using built-in any() argument matcher

    Lecture 8: Mockito – Verify method call

    Lecture 9: Mockito – Exception stubbing

    Lecture 10: Creating EmailNotificationService class

    Lecture 11: Mockito – Stub a void method with Exception

    Lecture 12: Mockito – Do nothing when method is called

    Lecture 13: Mockito – Call a real method

    Chapter 9: Code Coverage – Identify untested code in your Java application

    Lecture 1: Code Coverage – Introduction

    Lecture 2: Generating JUnit Code Coverage report with IntelliJ

    Lecture 3: Export JUnit Code Coverage Report using IntelliJ

    Lecture 4: Export JUnit Test Report using Maven

    Lecture 5: Jacoco – Maven Plugin for Code Coverage

    Lecture 6: Jacoco – Export Code Coverage Report in HTML format

    Chapter 10: Spring Boot (Part 1) – Testing Rest Controllers

    Lecture 1: Introduction to JUnit Testing of Spring Boot Application

    Lecture 2: Introduction to Integration Testing of Web Layer

    Lecture 3: Introduction to Integration Testing of All Layers in Spring Boot application

    Lecture 4: Adding Testing Support to a Spring Boot Application

    Lecture 5: Existing Project overview + Source code

    Lecture 6: New Test Class. @WebMvcTest & @AutoConfigureMockMvc.

    Instructors

  • Test Java applications with JUnit 5, Mockito, Testcontainers  No.2
    Sergey Kargopolov
    Software developer
  • Rating Distribution

  • 1 stars: 12 votes
  • 2 stars: 18 votes
  • 3 stars: 109 votes
  • 4 stars: 506 votes
  • 5 stars: 843 votes
  • Frequently Asked Questions

    How long do I have access to the course materials?

    You can view and review the lecture materials indefinitely, like an on-demand channel.

    Can I take my courses with me wherever I go?

    Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don’t have an internet connection, some instructors also let their students download course lectures. That’s up to the instructor though, so make sure you get on their good side!