poohbar
05/28/2018, 2:10 PM@Setup
@Before
.. it's really just a few extra lines that eliminates a lot of subtle bugs.. just try it for a while. At first I disliked it and used relaxed mocks but then I went back.
If you have to setup million calls returning null
or false
or whatever defaults would relaxed mockito mock return, you probably have other issues in your design.