The Baeldung logo
  • The Baeldung Logo
  • Start Here
  • Spring Courses ▼▲
    • REST with Spring Boot

      The canonical reference for building a production grade API with Spring

    • Learn Spring Security ▼▲

      THE unique Spring Security education if you’re working with Java today

      • Learn Spring Security Core

        Focus on the Core of Spring Security 6

      • Learn Spring Security OAuth

        Focus on the new OAuth2 stack in Spring Security 6

    • Learn Spring

      From no experience to actually building stuff​

    • Learn Spring Data JPA

      The full guide to persistence with Spring Data JPA

  • Java Courses ▼▲
    • Learn Junit

      Master the most popular Java testing framework.

  • Guides ▼▲
    • Spring Boot

      Get started and go deep into Spring Boot 3

    • Persistence

      The Persistence with Spring guides

    • REST

      The guides on building REST APIs with Spring

    • Security

      The Spring Security guides

  • About ▼▲
    • Full Archive

      The high level overview of all the articles on the site.

    • Baeldung Ebooks

      Discover all of our eBooks

    • About Baeldung

      About Baeldung.

  • Category upTesting
  • Category upMaven
  • Category upJava List

Tag: JUnit

Learn how to make the best use of the popular testing library for Java – JUnit. The guides below cover everything from basic examples to advanced features, differences between JUnit 4 and JUnit 5, and how to integrate with other helpful tools like Maven and Mockito.

>> @DataJpaTest and Repository Class in JUnit

  • popular

>> How to Mock Environment Variables in Unit Tests

  • popular

>> Mocking Private Fields With Mockito

  • popular

>> Mocking JDBC for Unit Testing

>> Mock JWT with JwtDecoder in JUnit Test

>> JSON Unit Test Assertions Using JsonUnit

>> How to Setup Stub Server Easily Using Moco

>> Avoiding “no runnable methods” Error in JUnit

>> Check if a List Contains Elements With Certain Properties in Hamcrest

>> The Difference Between JUnit and Mockito

>> assertEquals() vs. assertSame() in JUnit

>> Unit Test for hashCode() in Java

>> SpringRunner vs. SpringBootTest

>> Testing Interface Contract in Java

>> Unit Testing of System.in With JUnit

>> Asserting Equality on Two Classes Without an equals() Method

>> Gray Box Testing Using the OAT Technique

>> The Difference Between junit-vintage-engine and junit-jupiter-engine

>> Pitfalls on Testing with Spring Boot

>> Generate Unit Test Data in Java Using Instancio

  • ↑ Back to Top
  • 1
  • 2
  • 3
  • 4
  • Next →
The Baeldung logo

Courses

  • All Courses
  • Baeldung All Access
  • Baeldung All Team Access
  • The Courses Platform

Series

  • Java “Back to Basics” Tutorial
  • Learn Spring Boot Series
  • Spring Tutorial
  • Get Started with Java
  • Security with Spring
  • REST with Spring Series
  • All About String in Java

About

  • About Baeldung
  • The Full Archive
  • Editors
  • Our Partners
  • Partner with Baeldung
  • eBooks
  • FAQ
  • Baeldung Pro
  • Terms of Service
  • Privacy Policy
  • Company Info
  • Contact
The Baeldung Logo