title: Matching any parameterless function as an argument in scala Mockito
body: <p>I'm trying to verify the following method gets called using Mockito:</p>
  
  <pre><code>class Notifier {
    def forward(request: ServletRequest)(onFailure: =&gt; Unit) : Unit
  }
  </code></pre>
  
  <p>Here's the verification on a mock:</p>
  
  <pre><code>val notifier = mock[Notifier]
  there was one(notifier).forward(any[ServletRequest])(any[() =&gt; Unit])
  </code></pre>
  
  <p>And I get the exception:</p>
  
  <pre><code>   The mock was not called as expected: 
      Invalid use of argument matchers!
      3 matchers expected, 2 recorded.
      This exception may occur if matchers are combined with raw values:
          //incorrect:
          someMethod(anyObject(), "raw String");
      When using matchers, all arguments have to be provided by matchers.
      For example:
          //correct:
          someMethod(anyObject(), eq("String by matcher"));
  </code></pre>
  
  <p>I know this is caused by the last parameterless function.  How can I perform a verify properly here?</p>