title: org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
body: <p>My method in the service and test class :</p>
  
  <pre><code>public void updateSubModuleOrder(Long[] data, Long moduleSysId, Long userId) {
      try {
          for (int i = 0; i &lt; data.length; i++) {
              SubModule subModule=new SubModule();
  
              int temp = i + 1;
              userSubmodule.setDsplySeq(temp);
              userSubModuleDao.saveOrUpdate(userSubmodule);
  @Test
  public void testupdateSubModuleOrder(){
      UserModuleServiceImpl userModuleServiceImpl = new UserModuleServiceImpl();
      UserSubModuleDao userSubModuleDao = mock(User//set the required param ,some code here//
      UserSubModuleId userSubModuleId=new UserSubModuleId();
      //some code//
      when(userSubModuleDao.findById((any(UserSubModuleId.class)),false)).thenReturn(userSubModule);
      when(userSubModuleDao.saveOrUpdate(any(UserSubModule.class))).thenReturn(null);
      userModuleServiceImpl.updateSubModuleOrder(data, moduleSysId, userId);
  
  };*
  </code></pre>
  
  <p>the error I get is</p>
  
  <pre><code>FAILED: testupdateSubModuleOrder
  org.mockito.exceptions.misusing.InvalidUseOfMatchersException: 
  Invalid use of argument matchers!
  2 matchers expected, 1 recorded:
  -&gt; at com.TestUserModuleServiceImpl.testupdateSubModuleOrder(TestUserModuleServiceImpl.java:267)
  </code></pre>
  
  <p>This exception may occur if matchers are combined with raw values:</p>
  
  <pre><code>//incorrect:
  someMethod(anyObject(), "raw String");
  </code></pre>
  
  <p>When using matchers, all arguments have to be provided by matchers.
  For example:</p>
  
  <pre><code>//correct:
  someMethod(anyObject(), eq("String by matcher"));
  </code></pre>
  
  <p>the method <code>findbyID</code> is a baseDao method which my dao extends . It is not a final or static but still I'm getting this problem.</p>