### Question:
RemoveCanvasChildrenCommand extends AbstractCanvasCommand { @Override @SuppressWarnings("unchecked") public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { children.forEach(child -> { context.removeChild(parent, child); moveViewConnectorsToTop(context, child); }); return buildResult(); } RemoveCanvasChildrenCommand(final Node parent,
                                       final Collection<Node<?, Edge>> children);  RemoveCanvasChildrenCommand(final Node parent,
                                       final Node<?, Edge> child); @Override @SuppressWarnings("unchecked") CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context); Node getParent(); Collection<Node<?, Edge>> getChildren(); @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(graph1Instance.startNode), eq(graph1Instance.intermNode)); verify(canvasHandler, never()).applyElementMutation(eq(graph1Instance.startNode), any(MutationContext.class)); verify(canvasHandler, never()).applyElementMutation(eq(graph1Instance.intermNode), any(MutationContext.class)); verify(connectorShapeView1, times(1)).moveToTop(); verify(connectorShapeView1, never()).moveToBottom(); verify(connectorShapeView1, never()).moveUp(); verify(connectorShapeView1, never()).moveDown(); verify(connectorShapeView2, times(1)).moveToTop(); verify(connectorShapeView2, never()).moveToBottom(); verify(connectorShapeView2, never()).moveUp(); verify(connectorShapeView2, never()).moveDown(); }