### Question:
DeleteCanvasNodeCommand extends AbstractCanvasCommand { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { if (null != parent) { context.removeChild(parent, candidate); } context.deregister(candidate); if (null != parent) { context.applyElementMutation(parent, MutationContext.STATIC); } return buildResult(); } 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 @SuppressWarnings("unchecked") public void testExecute() { final CommandResult<CanvasViolation> result = tested.execute(canvasHandler); assertNotEquals(CommandResult.Type.ERROR, result.getType()); verify(canvasHandler, times(1)).removeChild(eq(parent), eq(candidate)); verify(canvasHandler, times(1)).deregister(eq(candidate)); verify(canvasHandler, times(1)).applyElementMutation(eq(parent), any(MutationContext.class)); }