title: EasyMock says unexpected invocation when the invocation is expected
body: <p>I'm experiencing some strange behavior with EasyMock. I've set up some expectations, but when I run my tests, EasyMock fails because my expectations execute as specified. Here is an example of the failure:</p>
  
  <pre><code>Unexpected method call MyClass.myMethod(en, EasyMock for interface com.google.common.collect.Multimap, EasyMock for interface java.util.concurrent.BlockingQueue, EasyMock for interface java.util.concurrent.BlockingQueue):
    MyClass.myMethod(en, EasyMock for interface com.google.common.collect.Multimap, EasyMock for interface java.util.concurrent.BlockingQueue, EasyMock for interface java.util.concurrent.BlockingQueue): expected: 100, actual: 0
  </code></pre>
  
  <p>The test looks like this:</p>
  
  <pre><code>Multimap&lt;String, String&gt; multimap = createMock(Multimap.class);
  BlockingQueue&lt;MyType&gt; myTypeQueue = createMock(BlockingQueue.class);
  BlockingQueue&lt;MyOtherType&gt; myOtherTypeQueue = createMock(BlockingQueue.class);
  MyClass myClass = createMock(MyClass.class);
  
  QueueFactory queueFactory = createMock(QueueFactory.class);
  expect(queueFactory.&lt;MyType&gt;getQueue(100)).andReturn(myTypeQueue).times(2);
  expect(queueFactory.&lt;MyOtherType&gt;getQueue(100)).andReturn(myOtherTypeQueue).times(2);
  
  expect(myClass.myMethod("en", multimap, myTypeQueue, myOtherTypeQueue)).andReturn(something).times(100);
  replayAll();
  
  // The actual method to test
  TestClass myTestInstance = new TestClass(myClass);
  myTestInstance.testMethod(queueFactory, multimap);
  myTestInstance.testMethod(queueFactory, multimap);
  </code></pre>
  
  <p>Here is the method I am testing:</p>
  
  <pre><code>public class MyTestClass
      private MyClass myClass;
  
      public MyTestClass(MyClass myClass) {
          this.myClass = myClass;
      }
  
      public void testMethod(QueueFactory queueFactory, Multimap&lt;String, String&gt; multimap) {
          BlockingQueue&lt;MyType&gt; myTypeQueue = queueFactory.getQueue(100);
          BlockingQueue&lt;MyOtherType&gt; myOtherTypeQueue = queueFactory.getQueue(100);
  
          for (int i = 0; i &lt; 50; ++i) {
              myClass.myMethod("en", multimap, myTypeQueue, myOtherTypeQueue);
          }
      }
  }
  </code></pre>
  
  <p>So far, I've tried replacing the mocks with instances of HashMultimap and ArrayBlockingQueue. I've also tried wrapping all of the method parameter's in <code>EasyMock.eq</code>. Neither of these approaches solved the issue.</p>
  
  <p>Any ideas why this is happening? </p>