title: Mockito - InvalidUse Of MatchersException
body: <p>I'm trying to mock up some classes, but the following code gives me problems:</p>
  
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  public class CalendarServiceTest {
  
      private Calendar calendar;
  
      @Mock
      MyClient myClient;
  
      @InjectMocks
      CalendarService calendarService;
  
      @Before
      public void initMocks() {
          List&lt;Proposal&gt; proposals = new ArrayList&lt;&gt;();
          calendar = org.mockito.Mockito.mock(Calendar.class);
          Proposal proposal = new Proposal();
          proposal.setAmount((float) 109.5);
          proposals.add(proposal);
          calendar.getProposal().addAll(proposals);
          when(calendar.getProposal()).thenReturn(proposals);
      }
  
      @Test
      public void getCalendar(){
          initMocks();
          when(myClient.getCalendar(anyString(), anyString(), anyString(), new LocalDate(), new LocalDate(), new LocalDate(), new LocalDate(), anyString(), anyString(), anyString())).thenReturn(calendar); // &lt;&lt;== exception here
          Assert.assertNotNull(calendar);
      }
  }
  </code></pre>
  
  <p>Running this get's me:</p>
  
  <pre><code>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>