This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes EasyMock: replace final method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "EasyMock: replace final method" Watch "EasyMock: replace final method" New topic
Author

EasyMock: replace final method

surlac surlacovich
Ranch Hand

Joined: Mar 12, 2013
Posts: 296

Hello Folks!
I'm trying to replace final method with custom method with EasyMock, but it doesn't call redefined method - it calls original one.
Can somebody put me right how to EasyMock for that purpose?



Output:
Error1: no last call on a mock available
5


Expected output:
7


surlac surlacovich
Ranch Hand

Joined: Mar 12, 2013
Posts: 296

Or maybe it's not even possible to replace method call with mock-method?
Why to use EasyMock then?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EasyMock: replace final method
 
Similar Threads
How should streams be closed?
Can somebody please explain me the output
Question on exception throwing
throws Error
not synchronizing on an object with wait