title: Not able to fully mock RestHighLevelClient
body: <p>I need to mock RestHighLevelClient to test my code. Basically when i call "search" method of RestHighLevelClient i get either UnfinishedStubbingException or WrongTypeOfReturnValue.</p>
  
  <pre><code>PowerMockito.doReturn(searchResponse).when(client.search(searchRequest, RequestOptions.DEFAULT));
  </code></pre>
  
  <p>this example throws UnfinishedStubbingException.</p>
  
  <pre><code>PowerMockito.when(client.search(searchRequest, RequestOptions.DEFAULT)).thenReturn(searchResponse);
  </code></pre>
  
  <p>this example throws WrongTypeOfReturnValue.</p>
  
  <p>Here is my config</p>
  
  <pre><code>@RunWith(PowerMockRunner.class)
  @PrepareForTest(value = {
          RestHighLevelClient.class
  ...otherClasses
  })
  </code></pre>
  
  <p>I googled about both exceptions but, i am not calling "mock.someMethod()" inside "thenReturn" method. Seems like every approach is not working.</p>