Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mocking final class with Powermock + Easymock + testNG  RSS feed

 
Atul A. Shah
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 TestNG test.
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!!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!