jMock is a library for testing Java code using mock objects. org.jmock