Final method mocking

From the Mockito FAQ:

What are the limitations of Mockito

  • Cannot mock final methods – their real behavior is executed without any exception. Mockito cannot warn you about mocking final methods so be vigilant.

Leave a Comment