Mockito

Mocking static methods is not a good idea

reading material

  1. https://testing.googleblog.com/2008/12/static-methods-are-death-to-testability.html
  2. https://lnbogen.com/2007/07/04/how-to-mock-static-class-or-static-member-for-testing/
  3. https://www.baeldung.com/mockito-mock-static-methods
  4. https://stackoverflow.com/questions/21105403/mocking-static-methods-with-mockito
  5. https://github.com/powermock/powermock/wiki/Mockito
  6. https://stackoverflow.com/questions/4482315/why-doesnt-mockito-mock-static-methods

Links to this note