GridLienzoScrollHandler { public Integer scrollbarHeight() { return getScrollPanel().getElement().getOffsetHeight() - getScrollPanel().getElement().getClientHeight(); } GridLienzoScrollHandler(final GridLienzoPanel panel); void init(); Integer scrollbarWidth(); Integer scrollbarHeight(); void refreshScrollPosition(); void setBounds(final Bounds bounds);  }
@Test public void testScrollbarHeight() { final AbsolutePanel scrollPanel = mock(AbsolutePanel.class); final Element element = mock(Element.class); final Integer offsetHeight = 1014; final Integer clientHeight = 1000; doReturn(offsetHeight).when(element).getOffsetHeight(); doReturn(clientHeight).when(element).getClientHeight(); doReturn(element).when(scrollPanel).getElement(); doReturn(scrollPanel).when(gridLienzoScrollHandler).getScrollPanel(); final Integer expectedScrollbarHeight = offsetHeight - clientHeight; final Integer actualScrollbarHeight = gridLienzoScrollHandler.scrollbarHeight(); assertEquals(expectedScrollbarHeight, actualScrollbarHeight); }