### Question:
AddContextEntryCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                  VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { uiModel.insertRow(uiRowIndex, uiModelRow); uiModelMapper.fromDMNModel(uiRowIndex, 0); uiModelMapper.fromDMNModel(uiRowIndex, 1); uiModelMapper.fromDMNModel(uiRowIndex, 2); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { final int rowIndex = uiModel.getRows().indexOf(uiModelRow); uiModel.deleteRow(rowIndex); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } AddContextEntryCommand(final Context context,
                                  final ContextEntry contextEntry,
                                  final GridData uiModel,
                                  final GridRow uiModelRow,
                                  final int uiRowIndex,
                                  final ContextUIModelMapper uiModelMapper,
                                  final org.uberfire.mvp.Command canvasOperation); void updateRowNumbers(); void updateParentInformation();  }### Answer:
@Test public void testCanvasCommandAllow() { makeCommand(); final Command<AbstractCanvasHandler, CanvasViolation> c = command.newCanvasCommand(handler); assertEquals(CanvasCommandResultBuilder.SUCCESS, c.allow(handler)); }