Most popular mocking framework for Java


Current version is 5.x
Still on Mockito 1.x? See what's new in Mockito 2!
Mockito 3 does not introduce any breaking API changes, but now requires Java 8 over Java 6 for Mockito 2.
Mockito 4 removes deprecated API.
Mockito 5 switches the default mockmaker to mockito-inline, and now requires Java 11.
Only one major version is supported at a time, and changes are not backported to older versions.
Mockito for enterprise
Available as part of the Tidelift Subscription.
The maintainers of org.mockito:mockito-core and thousands of other packages are working with Tidelift to deliver
commercial support and maintenance for the open source dependencies you use to build your applications. Save time,