I have following code line:
when(htmlEmailSpy.setFrom(anyString())).thenReturn(null);
Following code executes real htmlEmailSpy.setFrom(...)
but it throws exception.
@Spy
HtmlEmail htmlEmailSpy = new HtmlEmail();
What do I wrong?
my aim - set new behaviour to spy object.
Aucun commentaire:
Enregistrer un commentaire