Mockito Archive

Mockito Mock static method

In this post, we will see about Mockito Mock static method. If you want to mock static methods, you need to use PowerMockito.PowerMockito is capable of testing┬áprivate, final or static methods as it makes use …

Mockito Mock Example

In this lesson with Mockito, we will learn what is at the core of Mockito, which surprisingly is, mocks! Mock is an object that has predefined answers to method executions made during the test and …

PowerMock tutorial

1. Overview Mockito is a powerful, open-source Mocking framework in Java. The features it provides for unit-testing is inevitably unique and important, nonetheless, ease out a lot of work for developers while writing unit test …

Using Mockito with TestNG

TestNG is an open source automated testing framework which is meant to perform unit, functional, end-to-end, integration testing. TestNG need minimum Java JDK 5. Based on the website, TestNG is a testing framework inspired from …

Using Mockito with JUnit

In this lesson with Mockito, we will use another framework for complete testing, known as JUnit. According to JUnit website, JUnit is a simple framework to write repeatable tests. It is an instance of the …

Mockito Spy example

In this lesson on Spy in Mockito, we will see how Spies differ from Mocks and how are these used. Adding to classpath, using Maven The fastest way to add Mockito┬áto your project is using …

Mockito Example with Best Practices

In this lesson, we will study Mockito, a full fledged framework in Java to create test doubles or mocks. Introduction Mockito is an Open Source Mocking framework in Java and provides easy ways to create …

Join Our News Letter - Stay Updated

Subscribe to Awesome Java Content.
You can like our facebook page Java2blog