### Question:
MoveRowsCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                           VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler ach) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> allow(AbstractCanvasHandler context) { if (index == uiModel.getRowCount() - 1) { return CanvasCommandResultBuilder.failed(); } return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler ach) { uiModel.moveRowsTo(index, rows); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler ach) { uiModel.moveRowsTo(oldIndex, rows); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } MoveRowsCommand(final Context context,
                           final DMNGridData uiModel,
                           final int index,
                           final List<GridRow> rows,
                           final org.uberfire.mvp.Command canvasOperation); void updateRowNumbers(); void updateParentInformation();  }### Answer:
@Test public void testCanvasCommandAllow() { setupCommand(0, uiModel.getRow(0)); final Command<AbstractCanvasHandler, CanvasViolation> c = command.newCanvasCommand(handler); assertEquals(CanvasCommandResultBuilder.SUCCESS, c.allow(handler)); }