【发布时间】:2015-04-09 11:42:38
【问题描述】:
Mockito 为我正在模拟的类抛出错误 "The method when(T) in the type Stubber is not applicable for the arguments (void)",不知道为什么。
有问题的代码是:
Mockito.when(mockObject.myMethod(Mockito.any(MyExecutionContext.class))).thenReturn(value);
我知道有人问过类似的问题,但如果有人可以为此解释解决方案或指出正确的方向,我将不胜感激
【问题讨论】: