jMock 2 is a library for testing Java code using mock objects.
Mock objects help you design and test the interactions between the
objects in your programs.
- makes it quick and easy to define mock objects, so you don't
break the rhythm of programming.
- lets you define flexible constraints over object interactions,
reducing the brittleness of your tests.
- acts as a "domain-specific embedded language" for specifying
expectations so it is easy to read and understand the intent of
tests with mock objects.
- uses real method calls to specify expectations, so code can be
easily refactored in modern IDEs.
- is easy to extend.
More information can be found on
the jMock website (www.jmock.org).