### Question:
DeleteCanvasNodeCommand extends AbstractCanvasCommand { @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context) { final String ssid = context.getDiagram().getMetadata().getShapeSetId(); final AbstractCanvasCommand command = createUndoCommand(parent, candidate, ssid); return command.execute(context); } DeleteCanvasNodeCommand(final Node candidate);  DeleteCanvasNodeCommand(final Node candidate,
                                   final Node parent); @Override CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context); @SuppressWarnings("unchecked") static Node getParent(final Node node); static boolean isChildEdge(final Edge edge); static boolean isDockEdge(final Edge edge); Node getCandidate(); @Override String toString();  }### Answer:
@Test public void testUndo() { tested.undo(canvasHandler); verify(canvasHandler).register(SHAPE_SET_ID, candidate); verify(canvasHandler).addChild(parent, candidate); }