Mockito
Mockito is an open-source mocking framework for Java that enables developers to write efficient and readable unit tests. It helps isolate the code under test from its dependencies by creating mock objects, allowing for controlled behavior and verification of interactions.
Key facts
- First appeared
- 2007
- Category
- technology
- Problem solved
- Mockito was created to address the verbosity, poor readability, and inflexibility of existing mocking frameworks (like EasyMock 2.x) and manual stubbing/mocking in Java. It aimed to make writing unit tests with mocks simpler, more intuitive, and with less boilerplate code, thereby promoting better test design and maintainability for complex dependency graphs.
- Platforms
- jvm
Related technologies
Notable users
- Google (via Android development)
- Netflix
- Spring Framework ecosystem
- Numerous enterprise Java applications
- Countless open-source projects