JUnit Mockito doNothing Example

In this post, I will be showing one of the most widely used and popular JUnit Testing Mocking framework – Mockito. Mockito is one of the widely used testing API for Java.

Prerequisites

The following configurations are required in order to run the application

Eclipse
JDK 1.7
Have maven installed and configured
Junit, Mockito, PowerMockito dependency in pom.xml

Now we will see the below steps how to create a maven based Java project in Eclipse Continue reading “JUnit Mockito doNothing Example”

JUnit Mockito doReturn Example

In this post, I will be showing one of the most widely used and popular JUnit Testing Mocking framework – Mockito. Mockito is one of the widely used testing API for Java.

Prerequisites

The following configurations are required in order to run the application

Eclipse
JDK 1.7
Have maven installed and configured
Junit, Mockito, PowerMockito dependency in pom.xml Continue reading “JUnit Mockito doReturn Example”