Writing mock objects on your own can be tedious, but there are a lot of mock frameworks out there to help you with this task. EasyMock is a library for creating mocks for interfaces on the fly using the dynamic proxy API. It's been around for a couple of years now, and besides being very stable and robust, another advantage is that it is well known. So here comes EasyMock2, ready to rock--er, mock--the world. My first idea was to introduce only the new features of version 2, but I recognized that there are still a lot of people out there not using EasyMock at all. So I'm going to show what you can do with EasyMock using the new version 2.2 API.