Mockito.mock and @Mock are supposed to do the same thing. Curiously enough, this does not seem to be the case when mocking UriInfo. In my unit test using JUnit4, the code below works:
private UriInfo uriInfo = Mockito.mock(UriInfo.class);
whereas this raised error of "parameter uriInfo not set" upon running the test:
@Mock
private UriInfo uriInfo;