GridLienzoScrollHandler { void setupScrollBarSynchronization() { getScrollPanel().addDomHandler(onScroll(), ScrollEvent.getType()); synchronizeScrollSize(); } GridLienzoScrollHandler(final GridLienzoPanel panel); void init(); Integer scrollbarWidth(); Integer scrollbarHeight(); void refreshScrollPosition(); void setBounds(final Bounds bounds);  }
@Test public void testSetupScrollBarSynchronization() { final AbsolutePanel scrollPanel = mock(AbsolutePanel.class); final ScrollHandler scrollHandler = mock(ScrollHandler.class); doReturn(scrollHandler).when(gridLienzoScrollHandler).onScroll(); doReturn(scrollPanel).when(gridLienzoScrollHandler).getScrollPanel(); doNothing().when(gridLienzoScrollHandler).synchronizeScrollSize(); gridLienzoScrollHandler.setupScrollBarSynchronization(); verify(gridLienzoScrollHandler).synchronizeScrollSize(); verify(scrollPanel).addDomHandler(scrollHandler, ScrollEvent.getType()); }