我需要在 PowerMockito 中调用后存根。
appAcceptedDoc.getAppointmentAccepted().getRequestResponse().getRequestersID().getStringValue()
我知道这可以在 Mockito 中使用 RETURNS_DEEP_STUBS 作为附加参数在调用模拟时完成,但是如何使用 PowerMockito/ 来完成此操作,但似乎不接受与 Mockito 相同的参数。
AppointmentAcceptedDocument appAcceptedDoc = Mockito.mock(AppointmentAcceptedDocument.class, RETURNS_DEEP_STUBS); - Possible
AppointmentAcceptedDocument appAcceptedDoc = PowerMockito.mock(AppointmentAcceptedDocument.class, <?RETURNS_DEEP_STUBS?>); - Not possible