How to mock exceptions using Mockito?

In the previous post I shared a sample program to mock exception conditions using JMockit. Today we will look into exception mocking with Mockito. As I mentioned in the earlier post, during the development time, testing an exception scenario without the help of the second party/third party service developer is not an easy task. However […]
Continue reading…

 

How to mock dependencies using Mockito?

In today’s post I would share a sample program that mock dependencies of the unit under test using Mockito. Mockito is the most simple mocking framework I ever used for java. Mockito is annotation driven and the APIs perfectly written so that you don’t even have to open the API documents to understand it. The complete source […]
Continue reading…