I just put it in JUnit's ~`@Setup`~ `@Before` .. i...
# mockk
p
I just put it in JUnit's
@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.