@SuppressWarnings({ "unchecked", "rawtypes" })

@Test
public void getItem_itemRequested_dataCommunicatorInvoked() {
    DataCommunicator<String> dataCommunicator = Mockito
            .mock(DataCommunicator.class);
    Mockito.when(dataCommunicator.getDataProvider())
            .thenReturn((DataProvider) DataProvider.ofItems());
    GridDataView<String> dataView = new GridDataView<>(dataCommunicator,
            new Grid<>());
    dataView.getItem(42);
    Mockito.verify(dataCommunicator).getItem(42);
}