Take the tour ×  I'm trying to verify the following method gets
called using Mockito:  class Notifier {   def forward(request:
ServletRequest)(onFailure: => Unit) : Unit  Here's the
verification on a mock:  val notifier = mock[Notifier] there was
one(notifier).forward(any[ServletRequest])(any[() => Unit])  And
I get the exception:     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:         someMethod(anyObject(), "raw String");
For example:  I know this is caused by the last parameterless
function. How can I perform a verify properly here?
share|improve this question => Unit isn't a function type, but a
by-name parameter. –  Ben James Oct 2 '12 at 17:51 add comment
Your Answer    Browse other questions tagged or ask your own
question.