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

      From no experience to actually building stuff​

    • Learn Spring Data JPA

      The full guide to persistence with Spring Data JPA

    • View All Spring Courses

  • Java Courses ▼▲
    • Learn JUnit

      Master the most popular Java testing framework.

    • Learn Maven

      Simplify Your Build with Apache Maven

    • Learn Hibernate JPA

      Master persistence with the Java specification and Hibernate implementation

    • Learn Mockito

      Enhance your unit tests through practical mocking

    • View All Courses

  • Pricing
  • 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.

Testing » Mockito

Testing is a very important aspect to building a stable application. Learn how to use different Java-based testing tools through the guides below.

  • JUnit (80)
  • x Mockito (59)
  • JUnit 5 (59)
  • Selenium (32)
  • JMeter (18)
  • Hamcrest (17)
  • AssertJ (15)
  • Mockito Basics (13)
  • Cucumber (12)
  • Testcontainers (11)
  • TestNG (10)
  • Spock (10)

>> Why We Should Not Mock Collections With Mockito

  • popular

>> Using @Autowired and @InjectMocks in Spring Boot Tests

  • popular

>> What Is @MockitoSpyBean in Spring

>> How to Mock AmazonSQS in Unit Tests

>> Mocking Logger and LoggerFactory

>> How to Unit Test MapStruct Generated Mappers

>> Mocking JDBC for Unit Testing

>> Stub Getter and Setter in Mockito

>> Mock JWT with JwtDecoder in JUnit Test

>> Mocking a Method in the Same Test Class Using Mockito Spy

>> Mockito Answer API: Returning Values Based on Parameters

>> Mock Nested Method Calls Using Mockito

>> Mocking an Enum Using Mockito

>> Difference Between Mockito Core and Mockito Inline

>> A Guide to @‌MockBeans

>> How to Delay a Stubbed Method Response With Mockito

>> The Difference Between JUnit and Mockito

>> Mocking Protected Method in Java

>> The Difference Between doAnswer() and thenReturn() in Mockito

>> Multiple-Level Mock Injection Into Mockito Spy Objects

  • ↑ Back to Top
  • 1
  • 2
  • 3
  • Next →
Course – LSSO – NPI EA (tag = OAuth)
LSSO Course Banner
The Baeldung logo

Courses

  • All Courses
  • Baeldung All Access
  • Baeldung All Team Access
  • Login Course Platform

Series

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

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