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

      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 5

      • Learn Spring Security OAuth

        Focus on the new OAuth2 stack in Spring Security 5

    • Learn Spring

      From no experience to actually building stuff​

    • Learn Spring Data JPA

      The full guide to persistence with Spring Data JPA

  • Guides ▼▲
    • 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

Tag: Mockito

Mockito is a very popular testing framework for Java-based applications. Learn how to use it in your tests through the guides below.

>> HTTP Interface in Spring 6

>> SpringRunner vs MockitoJUnitRunner

>> Mocking a Singleton With Mockito

>> JUnit – Testing Methods That Call System.exit()

>> How to Mock HttpServletRequest

>> Mocking Static Methods With Mockito

>> Overview of Mockito MockSettings

>> Difference Between when() and doXxx() Methods in Mockito

>> Using Mockito ArgumentCaptor

>> Mocking the ObjectMapper readValue() Method

>> The Difference Between mockito-core and mockito-all

>> Introduction to Mockito’s AdditionalAnswers

>> Mockito and Fluent APIs

>> Mockito Strict Stubbing and The UnnecessaryStubbingException

>> Mockito Tutorial

>> Mocking a RestTemplate in Spring

>> Warning: “The type MockitoJUnitRunner is deprecated”

>> Testing an Abstract Class With JUnit

>> Mockito.mock() vs @Mock vs @MockBean

>> Testing Callbacks with Mockito

>> Mockito ArgumentMatchers

>> Quick Guide to BDDMockito

>> Mock Final Classes and Methods with Mockito

>> Lazy Verification with Mockito 2

>> Mocking of Private Methods Using PowerMock

>> Mockito and JUnit 5 – Using ExtendWith

>> Mocking Void Methods with Mockito

>> Mocking Exception Throwing using Mockito

>> Mockito’s Java 8 Features

>> Mockito vs EasyMock vs JMockit

>> Mockito’s Mock Methods

>> Introduction to PowerMock

>> Injecting Mockito Mocks into Spring Beans

>> Getting Started with Mockito @Mock, @Spy, @Captor and @InjectMocks

>> Mockito – Using Spies

>> Mockito When/Then Cookbook

>> Mockito Verify Cookbook

  • ↑ Back to Top
The Baeldung logo

Courses

  • All Courses
  • All Bulk Courses
  • All Bulk Team Courses
  • The Courses Platform

Series

  • Java “Back to Basics” Tutorial
  • Jackson JSON Tutorial
  • Apache HttpClient Tutorial
  • REST with Spring Tutorial
  • Spring Persistence Tutorial
  • Security with Spring
  • Spring Reactive Tutorials

About

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