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