After I started to practice Test Driven Development (TDD), I realized why Powermock is not a default extension for Easymock.
Whats wrong with Powermock in TDD?
"TDD drives the design". Loose coupling is one of the most important aspect of a good design. It is known that static methods increases coupling. (Hard/Impossible to use IoC). If static method mocking is allowed, you will start writing static methods. The class mocking discourages the use of interfaces which again increases coupling. Therefore enabling static mocking in a TDD support library drives the programmer away from the goals of TDD.When to use Powermock in TDD?
Is use of Powermock a sin like a murder? why still PowerMock is around? The answer is "Yes we need static method mocking & class mocking like features in certain cases."
These features are necessary when you practice TDD for a new code that has a legacy code or a library as a dependency. There can be static methods or classes without interfaces which are already written in the old code that will be used within the new code. In this case, Power
Conclusion
Always try to avoid mock libraries which supports static method mocking by default.
Use static mocking supported mock library when you practice TDD for new code you write on top of legacy code.