### Question:
AbstractCanvasGraphCommand extends AbstractCanvasCommand implements HasGraphCommand<AbstractCanvasHandler> { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { CommandResult<CanvasViolation> result = performOperationOnGraph(context, CommandOperation.EXECUTE); if (canDoNexOperation(result)) { final CommandResult<CanvasViolation> canvasResult = performOperationOnCanvas(context, CommandOperation.EXECUTE); if (!canDoNexOperation(canvasResult)) { performOperationOnGraph(context, CommandOperation.UNDO); return canvasResult; } } return result; }  @Override Command<GraphCommandExecutionContext, RuleViolation> getGraphCommand(final AbstractCanvasHandler context); Command<AbstractCanvasHandler, CanvasViolation> getCanvasCommand(final AbstractCanvasHandler context); @Override CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context); @Override CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testExecute() { CommandResult<CanvasViolation> result = tested.execute(canvasHandler); verify(graphCommand, times(1)).execute(eq(graphContext)); verify(canvasCommand, times(1)).execute(eq(canvasHandler)); assertEquals(CommandResult.Type.INFO, result.getType()); assertFalse(result.getViolations().iterator().hasNext()); }