Thanks for your reply. Don't know to be honest I am still learning but looking at the example on their website, it looks like we can mock classes having final methods etc using PowerMock.createMock method. Have a look at http://code.google.com/p/powermock/wiki/MockFinal.

Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572

posted Sep 23, 2010 06:50:14

0

Fixed the problem It looks like PowerMock 1.4.5 is not compatible with easymock 2.2. It works with EasyMock 3.0 as easymock 3.0 doesn't use class extensions anymore separately it is built into it. Also it needs javassist 3.12.0.GA. Thanks.