title: Why am I getting Mockito misplaced argument matcher detected here with anyInt()?
body: <pre><code>Mockito.when(metadataDao.getStuff(Mockito.anyInt()).get(Mockito.anyInt()))
                 .thenReturn(returnedVariable);
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <pre><code>java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      at java.util.LinkedList.checkElementIndex(LinkedList.java:555)
      at java.util.LinkedList.get(LinkedList.java:476)
      at 
  </code></pre>
  
  <p>Why can't I use the matchers?</p>