I'm trying to make a unit test with @InjectMocks
and @Mock
.
@RunWith(MockitoJUnitRunner.class)
public class ProblemDefinitionTest {
@InjectMocks
ProblemDefinition problemDefinition;
@Mock
Matrix matrixMock;
@Test
public void sanityCheck() {
Assert.assertNotNull(problemDefinition);
Assert.assertNotNull(matrixMock);
}
}
When I don't include the @RunWith
annotation, the test fails. But
The type MockitoJUnitRunner is deprecated
I'm using Mockito 2.6.9. How should I go about this?