JUnit : How to Mock Static Method
807601Mar 28 2008 — edited Jun 21 2010Hi,
I was using EasyMock to write Junit for the methods of the class.
The Limitation of this library is that only Interfaces can be mocked without any much effort and behavior can be set according to our needs.
Since, now we need to mock even normal classes, I got mocuer library from net and this too is easy to implement. The problem / limitation is that, I cant mock static methods of a class.
Is there is any workaround / library so that even static methods can be mocked??.
Advance thanks.