Mocking a concrete class using EasyMock

Samuel Carrijo picture Samuel Carrijo · Aug 8, 2009 · Viewed 16.2k times · Source

Is it possible to mock a concrete class using EaskMock? If so, how do I do it?

Answer

Jon Skeet picture Jon Skeet · Aug 8, 2009

See the EasyMock Class Extension documentation and download it from the SourceForge project. You can't mock final methods though.

EDIT: This is now part of EasyMock for v3 and above, as noted in comments.