79269387

Date: 2024-12-10 18:43:31
Score: 1
Natty:
Report link

This error can also happen in case of inheritance. If class A inherits from B and you are using

MockedStatic<A> mockAStatic = Mockito.mockStatic(A.class);

and you try to mock a method which is inherited from B, you'll get the above mentioned error. To fix it use the mock for B.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tanmay