我正在尝试断言rest客户端异常。restTemplate;
public void myTest() { restTemplate.postForEntity(Mockito.anyString(), Mockito.any(SomeBean.class), Mockito.any:85)
at org.<em
anotherClass.doSomething()).thenThrow(new MyException(mockedClass));然而,如果在void方法上使用相同的技术,notWorkingTestMethod()就会抛出org.mockito.exceptions.misusing.UnfinishedStubbingException,它不再抱怨: public void workingTestMethod