title: Mockito verify not working correctly
body: <p>I am quite new to Mockito, though I have been running tests successfully before and today it just look so strange why mockito verify() method keeps telling me that a <code>View</code> method is required but not called even though I am sure <code>Presenter</code> method is calling it correctly. Here is my test code: </p>
  
  <pre><code> @Test
  public void loadCallPlans_shouldUpdateAdapter() {
      ArrayResponse&lt;CallPlan&gt; callPlans = new ArrayResponse&lt;&gt;();
      callPlans.data = Arrays.asList(new CallPlan[]{new CallPlan(), new CallPlan()});
      Single response = Single.just(callPlans);
  
      when(callPlanRepository.getCallPlans()).thenReturn(response);
  
      presenter.loadCallPlans("Today");
  
      doAnswer((Answer&lt;Void&gt;) invocation -&gt; {
          Object[] args = invocation.getArguments();
          System.out.println("View.updateCallPlans() called with arguments: " + java.util.Arrays.toString(args));
          return null;
      }).when(view).updateCallPlans(anyList());
  
      verify(view).updateCallPlans(anyList());
  
  }
  </code></pre>
  
  <p>I could confirm that the <code>updateCallPlans()</code> method is called because I am getting <code>View.updateCallPlans() called with arguments: [[]]</code> in the logcat. My complete log:</p>
  
  <pre><code>View.updateCallPlans() called with arguments: [[]]
  
  
  Wanted but not invoked:
  view.updateCallPlans(&lt;any List&gt;);
  -&gt; at    CallPlansPresenterTest.loadCallPlans_should    UpdateAdapter(CallPlansPresenterTest.java:69)
  Actually, there were zero interactions with this mock.
  
  Wanted but not invoked:
  view.updateCallPlans(&lt;any List&gt;);
  -&gt; at     CallPlansPresenterTest.loadCallPlans_should    UpdateAdapter(CallPlansPresenterTest.java:69)
  Actually, there were zero interactions with this mock.
  
  at CallPlansPresenterTest.loadCallPlans_shouldUpdateAdapter(CallPlansPresenterTest.java:69)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:68)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:326)
  at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:89)
  at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:97)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:310)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:131)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.access$100(PowerMockJUnit47RunnerDelegateImpl.java:59)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner$TestExecutorStatement.evaluate(PowerMockJUnit47RunnerDelegateImpl.java:147)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.evaluateStatement(PowerMockJUnit47RunnerDelegateImpl.java:107)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:82)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:298)
  at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:87)
  at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:50)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:218)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:160)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:134)
  at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
  at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
  at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:136)
  at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:121)
  at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:57)
  at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
  at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
  at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
  at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
  at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
  at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at com.intellij.rt.execution.application.AppMainV2.main(AppMainV2.java:131)
  </code></pre>
  
  <p>If I make RxJava to return error as response, the test runs fine and <code>View.setError()</code> is correctly verified:</p>
  
  <pre><code> @Test
   public void loadCallPlans_shouldShowError() {
      String error = "Error";
      Single response = Single.error(new Throwable(error));
  
      when(callPlanRepository.getCallPlans()).thenReturn(response);
  
      presenter.loadCallPlans("Today");
  
      doAnswer((Answer&lt;Void&gt;) invocation -&gt; {
          Object[] args = invocation.getArguments();
          System.out.println("View.setError() called with arguments: " + java.util.Arrays.toString(args));
          return null;
      }).when(view).setError(anyString());
  
      verify(view).setError(error);
  
  }
  </code></pre>