I am trying to verify that a function was not called using the following:
verify {
managementService.deleteUser(any()) wasNot Called
}
That verification fails with the message:
Verification failed: call 1 of 1: ManagementService(#11).deleteUser(any())) was not called.
If I invert the verification to this:
verify {
managementService.deleteUser(any())
}
I still receive the same failure message.
There are other functions on ManagementService that pass wasNot Called just fine.
Why would my verification failing for wasNot Called, while the error message says the failure is because it was not called? And why would inverting the check produce the same error?