How to mock a static method using JMockit?

Sometime static method is a necessary evil. Especially while you work with legacy codebases you will have to mock some static behaviors/methods out to get some code coverage going for your area of interest. Today, I will share a very simple example of static method/behavior mocking using JMockit.

The complete source code of this article is available in github

Leave a comment

Your email address will not be published. Required fields are marked *