Oh fluck, we've just spent few hours on debugging ...
# test
a
Oh fluck, we've just spent few hours on debugging issue with Mockito 2 (same code was not failing with Mockito 1):
Copy code
open class StatefulAction1<T : Any> : Action1<T> {
    var state by Delegates.notNull<T>()
    override fun call(t: T) {
        state = t
    }
}
And test code:
Copy code
val action = Mockito.spy(StatefulAction1<String>())

action.call(“one”)

verify(action).call(“one”)
verifyNoMoreInteractions(action) // This line fails with Mockito 2, passes with Mockito 1.