title: mockito return sequence of objects on spy method
body: <p>I know you can set several different objects to be be returned on a mock. Ex. </p>
  
  <pre><code>when(someObject.getObject()).thenReturn(object1,object2,object3);
  </code></pre>
  
  <p>Can you do the same thing with a spied object somehow? I tried the above on a spy with no luck. I read in the docs to use <code>doReturn()</code> on a spy like below</p>
  
  <pre><code>doReturn("foo").when(spy).get(0);
  </code></pre>
  
  <p>But <code>deReturn()</code> only accepts one parameter. I'd like to return different objects in a specific order on a spy. Is this possible?</p>
  
  <p>I have a class like the following and i'm trying to test it. I want to test <code>myClass</code>, not <code>anotherClass</code> </p>
  
  <pre><code>public class myClass{
  
      //class code that needs several instances of `anotherClass`
  
      public anotherClass getObject(){
          return new anotherClass();
      }
  }
  </code></pre>