BaseGridRenderer implements GridRenderer { RendererCommand renderHighlightedCells(final GridData model, final GridBodyRenderContext context, final BaseGridRendererHelper rendererHelper, final BaseGridRendererHelper.RenderingInformation renderingInformation) { final GridColumn<?> column = model.getColumns().get(getHighlightCellColumnIndex()); final int visibleRowIndex = getHighlightCellRowIndex() - renderingInformation.getMinVisibleRowIndex(); return getRendererCommand(model, context, rendererHelper, renderingInformation, column, visibleRowIndex); } BaseGridRenderer(final GridRendererTheme theme); @Override double getHeaderHeight(); @Override double getHeaderRowHeight(); @Override GridRendererTheme getTheme(); @Override void setTheme(final GridRendererTheme theme); @Override RendererCommand renderSelector(final double width,
                                          final double height,
                                          final BaseGridRendererHelper.RenderingInformation renderingInformation); @Override RendererCommand renderSelectedCells(final GridData model,
                                               final GridBodyRenderContext context,
                                               final BaseGridRendererHelper rendererHelper,
                                               final List<GridData.SelectedCell> selectedCells,
                                               final BiFunction<SelectedRange, Integer, Double> selectedCellsYOffsetStrategy,
                                               final Function<SelectedRange, Double> selectedCellsHeightStrategy); @Override List<RendererCommand> renderHeader(final GridData model,
                                              final GridHeaderRenderContext context,
                                              final BaseGridRendererHelper rendererHelper,
                                              final BaseGridRendererHelper.RenderingInformation renderingInformation); @Override RendererCommand renderHeaderBodyDivider(final double width); @Override List<RendererCommand> renderBody(final GridData model,
                                            final GridBodyRenderContext context,
                                            final BaseGridRendererHelper rendererHelper,
                                            final BaseGridRendererHelper.RenderingInformation renderingInformation); @Override RendererCommand renderGridBoundary(final GridBoundaryRenderContext context); @Override boolean onGroupingToggle(double cellX,
                                    double cellY,
                                    double cellWidth,
                                    double cellHeight); @Override void setColumnRenderConstraint(final BiFunction<Boolean, GridColumn<?>, Boolean> columnRenderingConstraint); void clearCellHighlight(); void highlightCell(final int column, final int row); Integer getHighlightCellColumnIndex(); Integer getHighlightCellRowIndex();  }
@Test public void testRenderHighlightedCells() { final RenderingInformation renderingInformation = mock(RenderingInformation.class); final List<GridColumn<?>> columnsList = new ArrayList<>(); columnsList.add(column); final GridData dataModel = mock(GridData.class); doReturn(1).when(renderer).getHighlightCellRowIndex(); doReturn(0).when(renderer).getHighlightCellColumnIndex(); when(renderingInformation.getMinVisibleRowIndex()).thenReturn(1); when(dataModel.getColumns()).thenReturn(columnsList); final GridRenderer.RendererCommand result = renderer.renderHighlightedCells(dataModel, context, rendererHelper, renderingInformation); assertNotNull(result); }