pitest icon indicating copy to clipboard operation
pitest copied to clipboard

Pitest seems to ignore or never trigger Mockito's UnnecessaryStubbingException

Open daniel-frak opened this issue 7 months ago • 6 comments

Given a mutation, if a test mutated this way would normally fail with org.mockito.exceptions.misusing.UnnecessaryStubbingException, Pitest will report it as having survived.

It seems that Pitest never triggers Mockito's UnnecessaryStubbing checks.

I have encountered this issue more than once, where I was doing the same modifications as Pitest but getting different results, before realising that Pitest behaves as if all stubbings were lenient().

daniel-frak avatar Jul 24 '24 06:07 daniel-frak