You can try Mockito.RETURNS_SMART_NULLS, that would be used like mock(A.class, RETURNS_SMART_NULLS).
— Brice
--
You received this message because you are subscribed to the Google Groups "mockito" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mockito+u...@googlegroups.com.
To post to this group, send email to moc...@googlegroups.com.
Visit this group at https://groups.google.com/group/mockito.
To view this discussion on the web visit https://groups.google.com/d/msgid/mockito/0c85685f-af46-435b-8400-383875b3b66d%40googlegroups.com.
Then maybe just use a regular throwing answer :
mock(A.class, (invocation) -> throw new ProgrammerError("forgot to stub that method"));
--
--
You received this message because you are subscribed to the Google Groups "mockito" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mockito+u...@googlegroups.com.
To post to this group, send email to moc...@googlegroups.com.
Visit this group at https://groups.google.com/group/mockito.
To view this discussion on the web visit https://groups.google.com/d/msgid/mockito/518c5695-0edd-4162-8996-1b254e7417a5%40googlegroups.com.