This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm new to PowerMock and can't find an example that matches my situation.
It's nothing complicated-- I am trying to use PowerMock+EasyMock to mock a final class in a TestNGtest.
Here's the final class:
The class under test delegates to an instance of the final class:
And here's the Test class:
But when I run the test, I get an illegal argument exception complaining that MyFinalClass is not an interface:
What am I missing? Thanks in advance for your help!!!