Runner is completely optional - there are other ways you can get @Mock working, for example by writing a base class.
Read more in javadoc for {@link MockitoAnnotations}
Example:
@RunWith(MockitoJUnit44Runner.class) public class ExampleTest { @Mock private List list; @Test public void shouldDoSomething() { list.add(100); } }
|
|