title: Mocking Play WSRequestHolder get method using Scalamock
body: <p>I'm trying to test the following line of code using ScalaTest and ScalaMock.</p>
  
  <pre><code>val responseFuture = wsClient.url(url).withQueryString(params: _*).get()
  </code></pre>
  
  <p><code>wsClient</code> type is <code>THttpClient</code>, which is a wrapper of <code>play.api.libs.ws.WS</code>.</p>
  
  <p>Given that:</p>
  
  <pre><code>val mockHttpClient = mock[THttpClient]
  </code></pre>
  
  <p>is properly injected into my class under test, the test code is something like this:</p>
  
  <pre><code>val expectedUrl = "some url"
  val mockRequestHolder = mock[WSRequestHolder]
  inSequence {
    (mockHttpClient.url _).expects(expectedUrl).returns(mockRequestHolder)
    (mockRequestHolder.withQueryString _).expects(where {
      (parameters: Seq[(String, String)]) =&gt; {
        // assertions on parameters
        // ...
        true
      }
    }).returns(mockRequestHolder)
  
    val stubResponse = stub[WSResponse]
    val jsonBody = "{}"
    (stubResponse.json _).when().returns(Json.parse(jsonBody))
    (mockRequestHolder.get _).expects().returns(Future(stubResponse))
  }
  </code></pre>
  
  <p>IntelliJ is highlighting <code>mockRequestHolder.get</code> as an error saying: cannot resolve symbol get. Nevertheless I'm able to run the test but the mock is clearly not working, and I'm getting: java.util.NoSuchElementException: JsError.get.</p>
  
  <p>The mock is working when I try to mock any other method of <code>WSRequestHolder</code>, but not with method <code>get</code>.</p>
  
  <p>Is this a ScalaMock bug or am I doing something wrong?</p>