Mockito is a Java mocking framework for creating configurable fake objects with the same APIs as production classes. It helps isolate tests from complex business logic and external dependencies such as databases, remote services, and APIs. section 1.1
Mockito supports two complementary forms of test-double configuration:
- Stub behavior, such as making widgetService.count() return 5. section 1.1
- Verify interactions, such as confirming that emailService.sendEmail() was called once with a specified address. section 1.1
- Use Mockito imperatively in tests, including tests that do not involve Spring. section 1.1



