Description
Java tests can replace real collaborators with mock objects using a clean testing API. Developers use this framework when unit tests need isolated behavior, clearer expectations, and less dependency on external systems.
It is a testing library, not an application to open. Good tests still need realistic expectations and should not hide integration problems behind excessive mocking.