title: Cannot test callbacks with mockk: invoke(any())) was not called
body: <p>Given </p>
  
  <pre><code>typealias MyCallback = (s: String) -&gt; Unit
  
  object Hello {
      fun main() {
          blah { print(it) }
      }
      fun blah(cb: MyCallback) {
          cb.invoke("hi")
      }
  }
  </code></pre>
  
  <p>Or </p>
  
  <pre><code>interface MyCallback {
      fun invoke (s: String) {}
  }
  
  object Hello {
      fun main() {
          blah(object : MyCallback {
              override fun invoke(s: String) {
                  print(s)
              }
          })
      }
      fun blah(cb: MyCallback) {
          cb.invoke("hi")
      }
  }
  </code></pre>
  
  <p>With both I get the above error (<code>Verification failed: call 1 of 1: MyCallback(#2).invoke(any())) was not called</code>) when doing</p>
  
  <pre><code>    @Test
      fun testInvoke() {
          val mock = mockk&lt;Hello&gt;(relaxed = true)
          val cb = mockk&lt;MyCallback&gt;()
          mock.blah(cb)
          verify { cb.invoke(any()) }
      }
  </code></pre>
  
  <p>how to fix it?</p>