Andrew Ebling
02/15/2021, 10:21 AMsubject.openThePodBayDoors()
verify(mockDoorManager).completion(Mockito.any())
...then I get an error:
java.lang.IllegalStateException: Mockito.any() must not be null
...even though I have written the production code which should make this test pass.
I’ve been googling “kotlin mockito match any lambda” etc. and can find complex tests with LambdaMatcher
but all I want to do is check that the method was called with some lamba - I don’t even care what it does for this test. There must be a simple solution for this I’m missing, surely?verify(mockDoorManager).completion(argThat(ArgumentMatcher { true } ))