I\'d like to use strict mocks, at least when developing for the first time some tests against old code, so any methods invoked on my mock will throw an exception if I didn\'t sp
In addition to the MockitoRule
approach, if you don't need to use a specific test runner (and you are using Mockito 2.5.1 or higher), you could also consider using the MockitoJUnitRunner.StrictStubs
runner, i.e.
@RunWith(MockitoJUnitRunner.StrictStubs.class)
(I would have commented on the post about MockitoRule, but don't have that ability yet)