Mockito is an open source testing framework for Java released under the MIT License . The framework allows the creation of test double objects (mock objects) in automated unit tests for the purpose of test-driven development (TDD) or behavior-driven development (BDD).