@Mock doesn't do anything by itself. You need to have something to activate it:
* In JUnit 4, you would annotate your test class with
@RunWith(MockitoJUnitRunner.class).
* In JUnit 5, you would annotate your test class with
@ExtendWith(MockitoExtension.class). You need
this additional dependency.
* If you can't use either, explicitly call
MockitoAnnotations.initMocks(this) in your test class. This would preferably be done in an
@Before /
@BeforeEach method.