我正在尝试测试要验证的最终方法的调用。我不想执行那个。
//First I spied the test class.
TestClass testClass = spy(new TestClass());
//I did something like
doNothing().when(testClass ).method1(parameter);
...
//but in the following line I found the actual method1 is invoked and exceptions are thrown
verify(testClass ).method1(parameter);
如何只检查method1调用而不在被监视时执行?
谢谢你 !