How do I mock static methods in a class with easymock?

Not sure how to with pure EasyMock, but consider using the PowerMock extensions to EasyMock.

It has a lot of cool functions for doing just what you need –
https://github.com/jayway/powermock/wiki/MockStatic

Leave a Comment