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