@Test
public void setItemCountCallback_setAnotherCountCallback_itemCountChanged() {

    final AtomicInteger itemCount = new AtomicInteger(0);
    dataView.addItemCountChangeListener(
            event -> itemCount.set(event.getItemCount()));
    grid.getDataCommunicator().setRequestedRange(0, 50);
    dataView.setItemCountCallback(query -> 2);
    fakeClientCommunication();
    Assert.assertEquals("Invalid item count reported", 2, itemCount.get());
}