The other answers are great and contain more detail if you want/need them.
In addition to those, I would like to add a TL;DR:
@RunWith(MockitoJUnitRunner.class)
@Rule public MockitoRule rule = MockitoJUnit.rule();
@Before public void initMocks() {
MockitoAnnotations.initMocks(this);
}
X x = mock(X.class)
(1) and (2) and (3) are mutually exclusive.
(4) can be used in combination with the others.