title: mockito partial parmaters mocking
body: <p>I am trying to write unit test in java. Below is snippet of my code</p>
  
  <p>class Temp {
         public void method() {</p>
  
  <pre><code>       return someObject.someMethod(param1, param2, param3, param4, param5);
     }
  }
  </code></pre>
  
  <p>Test Method:</p>
  
  <pre><code>@Test
  public void testMethod() {
  
       Mokito.when(someObjectMock.someMethod(Mockito.anyString(), Mockito.anyString(), Mockito.anyInt(), Mockito.anyBoolean(),
                      false)). thenReturn(true);
  
       boolean status = temp.method();
  
       Assert.assertEquals(true, status);
  }
  </code></pre>
  
  <p>On executing the test case, I am however getting below error:</p>
  
  <pre><code> Invalid Use of argument matchers !
   5 matchers expected, 4 recorded
  </code></pre>
  
  <p>If my understanding is correct, it expects all parameters passed to be mocked. However thats not what I want, I wish to mock the first 4 parameters, and based on the 5 parameter (true or false), then appropriate return value of the method will specified.</p>
  
  <p>Is there way to get around this?</p>
  
  <p>Thanks</p>