GridLienzoScrollBars { void setVerticalScrollPosition(final Double percentage) { final Integer scrollHeight = scrollPanel().getElement().getScrollHeight(); final Integer clientHeight = scrollPanel().getElement().getClientHeight(); final Integer max = scrollHeight - clientHeight; setScrollTop((int) ((max * percentage) / 100)); } GridLienzoScrollBars(final GridLienzoScrollHandler gridLienzoScrollHandler);   }
@Test public void testSetVerticalScrollPosition() { doReturn(scrollPanel()).when(gridLienzoScrollHandler).getScrollPanel(); final Double percentage = 100d * SCROLL_TOP / (SCROLL_HEIGHT - CLIENT_HEIGHT); gridLienzoScrollBars.setVerticalScrollPosition(percentage); verify(gridLienzoScrollBars).setScrollTop(eq(SCROLL_TOP)); }