title: return iterator from thenReturn mockito
body: <p>Hi I have a class <code>A</code> implementing <code>Iterable</code>.
  I have this code to stub an object of this class:</p>
  
  <p>First way:</p>
  
  <pre><code>A source = mock(A.class);
  final List&lt;String&gt; documents = getList();
  when(source.iterator()).thenAnswer(new Answer&lt;Iterator&lt;String&gt;&gt;() {
      @Override
      public Iterator&lt;String&gt; answer(final InvocationOnMock invocation) throws Throwable {
          return documents.iterator();
      }
  });
  </code></pre>
  
  <p>Second way:</p>
  
  <pre><code>A source = mock(A.class);
  final List&lt;String&gt; documents = getList();
  when(source.iterator()).thenReturn(getList().iterator());
  </code></pre>
  
  <p>The first way returns a new <code>Iterator</code> on every call to <code>source.iterator()</code> but the second one returns the same <code>Iterator</code> object. So if I use second way to stub the source object, I get an empty iterator in subsequent calls to <code>source.iterator()</code>.</p>
  
  <p>Why is this happening? Shouldn't Mock return a new <code>Iterator</code> on every call to <code>source.iterator()</code>?</p>