In my recent contract with the Repositories program, I had an opportunity to use PowerMock. It takes EasyMock to a new level. It has options to mock static methods.

More information here – http://java.dzone.com/articles/powermock-features-and-use

PowerMock can be downloaded here – http://code.google.com/p/powermock/

«