GridHighlightHelper { double calculateRowOffset(final int row) { final double offset = getRendererHelper().getRowOffset(row); final double y = getGridWidget().getY() + offset; return -(y - getPaddingY()); } GridHighlightHelper(final GridLienzoPanel gridPanel,
                               final GridWidget gridWidget); void highlight(final int row,
                          final int column); void clearSelections(); void clearHighlight(); GridHighlightHelper withPaddingX(final double paddingX); GridHighlightHelper withPaddingY(final double paddingY); GridHighlightHelper withPinnedGrid();  }
@Test public void testCalculateRowOffset() { final double widgetY = -32; final double paddingY = 20; final double expected = -(widgetY + rowOffset - paddingY); when(highlightHelper.getPaddingY()).thenReturn(paddingY); when(gridWidget.getY()).thenReturn(widgetY); final double actual = highlightHelper.calculateRowOffset(row); assertEquals(expected, actual, 0.01d); }