GridLienzoScrollHandler { public void refreshScrollPosition() { synchronizeScrollSize(); setScrollBarsPosition(scrollPosition().currentRelativeX(), scrollPosition().currentRelativeY()); } GridLienzoScrollHandler(final GridLienzoPanel panel); void init(); Integer scrollbarWidth(); Integer scrollbarHeight(); void refreshScrollPosition(); void setBounds(final Bounds bounds);  }
@Test public void testRefreshScrollPosition() { final GridLienzoScrollPosition scrollPosition = mock(GridLienzoScrollPosition.class); final Double internalScrollPanelWidth = 42d; final Double internalScrollPanelHeight = 58d; doReturn(internalScrollPanelWidth).when(scrollPosition).currentRelativeX(); doReturn(internalScrollPanelHeight).when(scrollPosition).currentRelativeY(); doReturn(scrollPosition).when(gridLienzoScrollHandler).scrollPosition(); doNothing().when(gridLienzoScrollHandler).synchronizeScrollSize(); doNothing().when(gridLienzoScrollHandler).setScrollBarsPosition(anyDouble(), anyDouble()); gridLienzoScrollHandler.refreshScrollPosition(); verify(gridLienzoScrollHandler).synchronizeScrollSize(); verify(gridLienzoScrollHandler).setScrollBarsPosition(internalScrollPanelWidth, internalScrollPanelHeight); }