title: Verify Kotlin function as parameter in unittest
body: <p>I am trying to verify kotlin function in parameter in unit test but failed. Here is my code</p>
  
  <p>Unit test:</p>
  
  <pre><code>verify(moveToNextStepUseCase).execute(validateStepAssemblyUseCase.validate(ID),
                  { view.showCompleteAssemblyConfirmDialog(type) },
                  { view.showCompleteAssemblyErrorDialog() })
  </code></pre>
  
  <p>My <code>moveToNextStepUseCase</code> code:</p>
  
  <pre><code>interface MoveToNextStepUseCase {
      fun execute(validator: () -&gt; Observable&lt;Boolean&gt;, successAction: () -&gt; Unit, errorAction: () -&gt; Unit)
  }
  </code></pre>
  
  <p>My calling code:</p>
  
  <pre><code>moveToNextStepUseCase.execute(
                                          validateStepAssemblyUseCase.validateMissingAssembly(assignmentId),
                                          { view.showCompleteAssemblyConfirmDialog(currentStepId) },
                                          { view.showCompleteAssemblyErrorDialog() }
                                  )
  </code></pre>
  
  <p>But I got the error after running test:</p>
  
  <pre><code>Argument(s) are different! Wanted:
  moveToNextStepUseCase.execute(
      Function0&lt;io.reactivex.Observable&lt;java.lang.Boolean&gt;&gt;,
      (move next assembly step incomplete case$1) Function0&lt;kotlin.Unit&gt;,
      (move next assembly step incomplete case$2) Function0&lt;kotlin.Unit&gt;
  );
  
  Actual invocation has different arguments:
  moveToNextStepUseCase.execute(
      Function0&lt;io.reactivex.Observable&lt;java.lang.Boolean&gt;&gt;,
      () Function0&lt;kotlin.Unit&gt;,
      () Function0&lt;kotlin.Unit&gt;
  );
  </code></pre>
  
  <p>Anyone knows why the parameter is empty in actual invoke? <code>()</code></p>