Contents

Mockito allows developers to verify the behavior of the system under test (SUT) without establishing expectations beforehand.[3] One of the criticisms of mock objects is that there is a tight coupling of the test code to the system under test.[4] Mockito attempts to eliminate the expect-run-verify pattern[5] by removing the specification of expectations. Mockito also provides some annotations for reducing boilerplate code.[6]

It uses mock objects only in place of Appendable interfaces, uses the real implementations for other (HelloActable and Greeter) interfaces, and implicitly assumes the next use case:

integrationTest says welcome universe

As can be seen from the import statements of HelloActionUnitTest and HelloActionIntegrationTest classes, it is necessary to put some Mockito jars and JUnit jars in your class path to be able to compile and run the test classes.