title: Mock private void method with parameters using Mockito
body: <p>I am trying to mock a private void method with parameters using Mockito  as below:  </p>
  
  <pre><code>MyClass clsSpy = spy(new MyClass());
  doNothing().when(clsSpy, method("privateMethod", String.class, boolean.class))
      .withArguments(any(String.class), any(boolean.class));
  </code></pre>
  
  <p>but it is not able to find the symbol <code>method</code>.</p>
  
  <p>I know this can be done with the help of PowerMock. But is there a way to do this using Mockito only?  </p>
  
  <p>Thanks in advance.</p>