### Question:
UpdateParameterNameCommand 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) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } UpdateParameterNameCommand(final InformationItem parameter,
                                      final String name,
                                      final org.uberfire.mvp.Command canvasOperation);   }### Answer:
@Test public void testCanvasCommandAllow() { final Command<AbstractCanvasHandler, CanvasViolation> c = command.newCanvasCommand(handler); assertEquals(CanvasCommandResultBuilder.SUCCESS, c.allow(handler)); }
@Test public void testCanvasCommandExecute() { final Command<AbstractCanvasHandler, CanvasViolation> c = command.newCanvasCommand(handler); assertEquals(CanvasCommandResultBuilder.SUCCESS, c.execute(handler)); verify(canvasOperation).execute(); }
@Test public void testCanvasCommandUndo() { final Command<AbstractCanvasHandler, CanvasViolation> c = command.newCanvasCommand(handler); assertEquals(CanvasCommandResultBuilder.SUCCESS, c.undo(handler)); verify(canvasOperation).execute(); }