How to mock a static method from JMockit

To mock your static method:

new MockUp<MyClass>()
{
    @Mock
    boolean mockMethod( String input ) // no access modifier required
    {
        return true; 
    }
};

Leave a Comment