private int privateMethod(Object o, boolean b) throws Exception
-
PowerMockito.doThrow(new Throwable("Just a throwable")).when(spy, "privateMethod", Mockito.any(), Mockito.any());
-
org.mockito.exceptions.misusing.UnfinishedStubbingException:
Unfinished stubbing detected
我已经尝试将any()切换为anyObject()等。 但我得到了存根问题......
错误在哪里?
答案 0 :(得分:0)
org.mockito.Matchers.anyBoolean
匹配器为我工作。
anyObject
和any
与原语不匹配。