Skip to content


Subversion checkout URL

You can clone with
Download ZIP
simpler & better mocking
Java Other

This branch is 17 commits behind mockito:master

Failed to load latest commit information.
buildSrc Merge branch 'bytebuddy-mockmaker'
cglib-and-asm Additional line ending fixes
conf Removes all CRLF line ending created by misconfigured Windows IDE
doc "Update release notes by Travis CI build 516 [ci skip]"
gradle Replaces cobertura/coveralls by jacoco/codecov
javadoc Makes javadoc use new logo
lib Additional line ending fixes
mockmaker Removed explicit byte code version to support Java 8 default methods.
src/org/mockito Tidied up unit tests and the documentation.
subprojects Reason for a type to be non mockable is now given by the mockmaker
test/org Tidied up unit tests and the documentation.
.checkstyle Additional line ending fixes
.gitattributes Add .gitattributes to enforce LF
.gitignore Adds .eml to ignored files
.travis.yml Replaces cobertura/coveralls by jacoco/codecov Adds line ending info
HOWTO.BUILD.TXT Updated the information on how to build mockito.
LICENSE added refEq matcher based on reflectionEquals from apache commons lang
NOTICE Final touches to making the build to produce also jars with sources codecov link fix
build-ant.xml Stopped publishing mockito-all distribution
build.gradle Upgraded to Byte Buddy version 0.6.11 and took improved features into…
commits.txt Removed stale files. Moved recent design doc to the specific dir.
dummy-commit.txt Push build. Enabled parallel build.
gradlew Upgrade to Gradle 1.8
gradlew.bat Additional line ending fixes
osgi.gradle Upgraded to Byte Buddy version 0.6.11 and took improved features into…
settings.gradle Activate TestNG module Increment version '2.0.23-beta' -> '2.0.24-beta' by Travis CI build 5…


Tasty mocking framework for unit tests in Java

build status Build Status Coverage Status MIT License

latest 1.x latest stable 1.x on bintray latest stable 1.x on maven central

latest 2.x Current release Maven Central

Current release

See the release notes page and latest documentation.


Mockito has an automated release system, which imposed some change how the version numbers. While this is similar to semver, there's some differences. Let's look at the following versions 1.10.19 and 2.0.5-beta and 2.0.0 (not yet released) they follow this scheme :
number meaning
major major version, with most probably incompatible change in API and behavior
minor minor version, important enough change to bump this number
build a released build number incremented automatically a pull request is merged
tag will probably be -beta or just nothing (during beta, breaking changes are expected)

That means :

  • 2.0.0 and 2.0.5-beta are binary incompatible with 1.10.19.
  • 2.0.5-beta is the fifth release beta of version 2.0.0.
  • 2.0.5-beta is a work in progress, api may change and may not be graduated in version 2.0.0

Looking for support

More information

All you want to know about Mockito is hosted at The Mockito Site which is Open Source and likes pull requests, too.

Want to contribute? Take a look at the Contributing Guide.

Enjoy Mockito!

Something went wrong with that request. Please try again.