### Question:
RelationGrid extends BaseExpressionGrid<Relation, RelationGridData, RelationUIModelMapper> implements HasListSelectorControl { void addRow(final int index) { getExpression().get().ifPresent(relation -> { final GridRow relationRow = new LiteralExpressionGridRow(); sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new AddRelationRowCommand(relation, new List(), model, relationRow, index, uiModelMapper, () -> resize(BaseExpressionGrid.RESIZE_EXISTING))); }); } RelationGrid(final GridCellTuple parent,
                        final Optional<String> nodeUUID,
                        final HasExpression hasExpression,
                        final Optional<HasName> hasName,
                        final DMNGridPanel gridPanel,
                        final DMNGridLayer gridLayer,
                        final RelationGridData gridData,
                        final DefinitionUtils definitionUtils,
                        final SessionManager sessionManager,
                        final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                        final DefaultCanvasCommandFactory canvasCommandFactory,
                        final Event<ExpressionEditorChanged> editorSelectedEvent,
                        final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent,
                        final Event<DomainObjectSelectionEvent> domainObjectSelectionEvent,
                        final CellEditorControlsView.Presenter cellEditorControls,
                        final ListSelectorView.Presenter listSelector,
                        final TranslationService translationService,
                        final boolean isOnlyVisualChangeAllowed,
                        final int nesting,
                        final ManagedInstance<ValueAndDataTypePopoverView.Presenter> headerEditors,
                        final ReadOnlyProvider readOnlyProvider); @Override RelationUIModelMapper makeUiModelMapper(); @Override void initialiseUiColumns(); @Override void initialiseUiRows(); @Override void initialiseUiCells(); @Override @SuppressWarnings("unused") java.util.List<ListSelectorItem> getItems(final int uiRowIndex,
                                                     final int uiColumnIndex); @Override void onItemSelected(final ListSelectorItem item); @Override void doAfterSelectionChange(final int uiRowIndex,
                                       final int uiColumnIndex); @Override void doAfterHeaderSelectionChange(final int uiHeaderRowIndex,
                                             final int uiHeaderColumnIndex);  }### Answer:
@Test public void testGetItemsWithCellSelectionsCoveringMultipleRows() { setupGrid(0); addRow(0); grid.getModel().selectCell(0, 0); grid.getModel().selectCell(1, 0); assertListSelectorItemEnabled(0, 0, INSERT_ROW_ABOVE, false); assertListSelectorItemEnabled(0, 0, INSERT_ROW_BELOW, false); assertListSelectorItemEnabled(0, 0, DELETE_ROW, false); }
@Test public void testAddRow() { setupGrid(0); addRow(0); verifyCommandExecuteOperation(BaseExpressionGrid.RESIZE_EXISTING); }