Mockito: Ambiguous reference to overloaded definition
<p>Given the following code that mocks a Scala class with Mockito, I get an error and cannot compile:</p>

<pre><code>import org.mockito.Mockito._

class Testeable {
  def fun1 = 1
  def fun2 = 2
}

object test {

  def getMock = {
      val testMock = mock[Testeable]  // &lt;-- this line throws the error
      when(testMock.fun1).thenReturn(3)
      testMock
  }

}
</code></pre>

<p>Error is:</p>

<blockquote>
  <p>ambiguous reference to overloaded definition, both method mock in
  object Mockito of type (x$1: Class[common.Testeable], x$2:
  org.mockito.MockSettings)common.Testeable and method mock in object
  Mockito of type (x$1: Class[common.Testeable], x$2:
  org.mockito.stubbing.Answer[_])common.Testeable match expected type ?</p>
</blockquote>

<p>I just mocked a class, what's ambiguous?</p>