Mockito
-
Mockito Initmocks Example
In this example we will learn how to initialize mocks in Mockito. A unit test should test a class in…
Read More » -
Initializing Mockito with InitMocks
In the Mockito Tutorial for Beginners, we saw a general overview of the use of Mockito framework for Java unit…
Read More » -
Mockito Tutorial for Beginners
Mocking is a testing technique widely used not only in Java, but in any other object oriented programming language, that…
Read More » -
Spring Test Mock Example
A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated…
Read More » -
Mockito Mock Private Method Example with PowerMock
A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated…
Read More » -
Mockito Captor Example
A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated…
Read More » -
Mockito ThenReturn Example
In this example we will learn how to use ‘thenReturn’ method of Mockito. A unit test should test a class…
Read More » -
JUnit Mockito Example
1. Introduction Methods and ways to create Unit Test cases have evolve ever since it’s introduction. New tools and API´s…
Read More » -
Mockito mock static method example
In this article, I am going to show you how to mock static methods using Powermockito. PowerMock is an open source…
Read More » -
Powermock – Mockito Integration Example
Most of the mocking frameworks in Java, including Mockito, cannot mock static methods or final classes. If we come across…
Read More »