class AndroidMocks {

    public static TextView mockTextView() {
        return mock(TextView.class);
    }

}

class AndroidMocksTest {

    @Test
    public void mockTextView() {

        TextView textView = AndroidMocks.mockTextView();
        assertThat(textView).isNotNull();
    }

}