title: How to stub a method call with an implicit matcher in Mockito and Scala
body: <p>My application code uses AService</p>
  
  <pre><code>trait AService {
      def registerNewUser (username: String)(implicit tenant: Tenant): Future[Response]
  }
  </code></pre>
  
  <p>to register a new user. Class Tenant is a simple case class:</p>
  
  <pre><code>case class Tenant(val vstNumber:String, val divisionNumber:String) 
  </code></pre>
  
  <p>Trait AServiceMock mimics the registration logic by using a mocked version of AService</p>
  
  <pre><code>trait AServiceMock {
    def registrationService = {
      val service = mock[AService]
      service.registerNewUser(anyString) returns Future(fixedResponse)
      service
    }
  }
  </code></pre>
  
  <p>Iow whenever registerNewUser is called on AService the response will be "fixedResponse" (defined elsewhere).</p>
  
  <p>My question is, how do I define the implicit tenant-parameter as a mockito matcher like anyString?</p>
  
  <p>btw. I'm using Mockito with Specs2 (and Play2)</p>