class Mocker {

    public T mock() {
        return mock(0);
    }

}

class MockerTest {

    @Test
    public void testMock() {

        List mock = mock(List.class);
        when(mock.size()).thenReturn(3);

        assertThat(mock.size()).isEqualTo(3);
    }

}