jmock

jMock is a library for testing Java code using mock objects