Gualtiero Testa (17) [Avatar] Offline

in the listing 3.10, the value (the entity id) returned by
is not checked.

This is somehow understandable because the entity manager is mocked but I don’t find very clean, at least for a first Mockito example.

In general I think the return values should be the first think to check and then we can also check the side-effects (the call to the merge method by Mockito.verify).

May be it is worth to mention this to the reader.