Junit Test with Mockito
Mockito is a testing framework for Java which allows the creation of Test Double objects called "Mock Objects" for use in automated unit testing in conjunction with framework like Junit. For more details, Check here . This blog will show you step by step working of Mockito. Step 1 : You need mockito-all and Junit jars into you project classpath which you can download it from here . If you are using maven, add following dependency into your pom.xml file. <dependency> <groupid>org.mockito</groupid> <artifactid>mockito-all</artifactid> <version>1.9.5</version> </dependency> <dependency> <groupid>junit</groupid> <artifactid...