Mockito (http://site.mockito.org/) is an open source mock unit testing framework for Java, first released in April 2008. Of course, Mockito is not the only mock framework for Java; there are others, such as the following:
- EasyMock (http://easymock.org/).
- JMock (http://www.jmock.org/).
- PowerMock (http://powermock.github.io/).
- JMockit (http://jmockit.org/).
We can say that, at the time of writing, Mockito is the preferred mock framework in Java tests for the most developers and testers. To justify that claim, we use the following screenshot, which shows the evolution of the terms Mockito, EasyMock, JMock, PowerMock, and JMockit in Google Trends (https://trends.google.com/) from 2004 to 2017. At the beginning of this period, we can see there was a significant interest on EasyMock and JMock; nevertheless, Mockito was more in demand compared with the rest of the frameworks...