I have the test
Document document = spy(new Document());
Whitebox.setInternalState(documentReceiverInteractor, "document", document);
String text= "string";
Whitebox.invokeMethod(documentReceiverInteractor, "saveFields", anyString(), eq(text), anyString(),
anyString(), anyString(), anyString(), anyString());
verify(document).setText(text);
after startup, I get this error:
Argument(s) are different! Wanted:
document.setText(
<any string>
);
-> at ru.psbank.msb.dev.business.document.edit.receiver.DocumentReceiverInteractorTest.saveFields(DocumentReceiverInteractorTest.java:98)
Actual invocation has different arguments:
document.setText(
null
);
eq
works fine with primitives and there are no objects. What should I do?