### Question:
UndefinedExpressionGrid extends BaseDelegatingExpressionGrid<Expression, DMNGridData, UndefinedExpressionUIModelMapper> implements HasListSelectorControl { @Override public double getPadding() { return PADDING; } UndefinedExpressionGrid(final GridCellTuple parent,
                                   final Optional<String> nodeUUID,
                                   final HasExpression hasExpression,
                                   final Optional<HasName> hasName,
                                   final DMNGridPanel gridPanel,
                                   final DMNGridLayer gridLayer,
                                   final DMNGridData 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 UndefinedExpressionSelectorPopoverView.Presenter undefinedExpressionSelector,
                                   final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                                   final ExpressionGridCache expressionGridCache,
                                   final ReadOnlyProvider readOnlyProvider); @Override List<NodeMouseEventHandler> getNodeMouseClickEventHandlers(final GridSelectionManager selectionManager); @Override List<NodeMouseEventHandler> getNodeMouseDoubleClickEventHandlers(final GridSelectionManager selectionManager,
                                                                            final GridPinnedModeManager pinnedModeManager); @Override UndefinedExpressionUIModelMapper makeUiModelMapper(); @Override void initialiseUiRows(); @Override void initialiseUiCells(); @Override double getPadding(); @Override boolean isCacheable(); void onExpressionTypeChanged(final ExpressionType type); @SuppressWarnings("unused") void doAfterSelectionChange(final int uiRowIndex,
                                       final int uiColumnIndex);  }### Answer:
@Test public void testPaddingWithParent() { setupGrid(0); doReturn(Optional.of(mock(BaseExpressionGrid.class))).when(grid).findParentGrid(); assertThat(grid.getPadding()).isEqualTo(UndefinedExpressionGrid.PADDING); }
@Test public void testPaddingWithNoParent() { setupGrid(0); doReturn(Optional.empty()).when(grid).findParentGrid(); assertThat(grid.getPadding()).isEqualTo(UndefinedExpressionGrid.PADDING); }