title: Mockito answer is getting invoked only once
body: <p>I am trying to mock spring's applicationContext.getBean(String, Class) method in below manner - </p>
  
  <pre><code>when(applicationContext.getBean(Mockito.anyString(), Mockito.eq(SomeClass.class))).thenAnswer(
                  new Answer&lt;SomeClass&gt;() {
                      @Override
                      public SomeClass answer(InvocationOnMock invocation) throws Throwable {
                          // doing some stuff and returning the object of SomeClass
                  }
          });
  </code></pre>
  
  <p>The scenario is that, the applicationContext.getBean method will be called a number of times, each time a with different strings but the same class (SomeClass.class).</p>
  
  <p>The problem I am getting here is that the answer is getting invoked for the very first invocation of getBean method. With each subsequent invocation of getBean I am getting below exception - </p>
  
  <pre><code>******org.mockito.exceptions.misusing.InvalidUseOfMatchersException: 
  Invalid use of argument matchers!
  2 matchers expected, 1 recorded:
  This exception may occur if matchers are combined with raw values:
      //incorrect:
      someMethod(anyObject(), "raw String");
  When using matchers, all arguments have to be provided by matchers.
  For example:
      //correct:
      someMethod(anyObject(), eq("String by matcher"));******
  </code></pre>
  
  <p>Any idea, if I am missing something ?</p>