我使用mockito 3
如下:
Mockito.when(webServiceTemplate.marshalSendAndReceive(Mockito.anyString(),
ArgumentMatchers.<JAXBElement<TypeA>>any()))
.thenReturn(responseA);
Mockito.when(webServiceTemplate.marshalSendAndReceive(Mockito.anyString(),
ArgumentMatchers.<JAXBElement<TypeB>>any()))
.thenReturn(responseB);
问题是 mockito 总是返回responseB
. 问题出在哪里?