### Question:
WiresConnectorView extends WiresConnector implements
        LienzoShapeView<T>,
        IsConnector<T>,
        HasManageableControlPoints<T> { @Override public T addControlPoint(final ControlPoint controlPoint, final int index) { addControlPoint(controlPoint.getLocation().getX(), controlPoint.getLocation().getY() , index + 1); refreshControlPoints(); return cast(); } WiresConnectorView(final AbstractDirectionalMultiPointShape<?> line,
                              final MultiPathDecorator headDecorator,
                              final MultiPathDecorator tailDecorator);  WiresConnectorView(final WiresMagnet headMagnet,
                              final WiresMagnet tailMagnet,
                              final AbstractDirectionalMultiPointShape<?> line,
                              final MultiPathDecorator headDecorator,
                              final MultiPathDecorator tailDecorator); @Override @SuppressWarnings("unchecked") T setUUID(final String uuid); @Override String getUUID(); T setListening(final boolean listening); @Override ControlPoint[] getManageableControlPoints(); @Override T addControlPoint(final ControlPoint controlPoint,
                             final int index); @Override T updateControlPoints(final ControlPoint[] controlPoints); @Override T deleteControlPoint(final int index); @SuppressWarnings("unchecked") T connect(final ShapeView headShapeView,
                     final Connection headConnection,
                     final ShapeView tailShapeView,
                     final Connection tailConnection); @Override double getShapeX(); @Override double getShapeY(); @Override T setShapeLocation(final Point2D location); @Override double getAlpha(); @Override @SuppressWarnings("unchecked") T setAlpha(final double alpha); @Override Point2D getShapeAbsoluteLocation(); @Override String getFillColor(); @Override @SuppressWarnings("unchecked") T setFillColor(final String color); @Override double getFillAlpha(); @Override @SuppressWarnings("unchecked") T setFillAlpha(final double alpha); @Override String getStrokeColor(); @Override @SuppressWarnings("unchecked") T setStrokeColor(final String color); @Override double getStrokeAlpha(); @Override @SuppressWarnings("unchecked") T setStrokeAlpha(final double alpha); @Override double getStrokeWidth(); @Override @SuppressWarnings("unchecked") T setStrokeWidth(final double width); @Override T setDragEnabled(boolean draggable); @Override @SuppressWarnings("unchecked") T moveToTop(); @Override @SuppressWarnings("unchecked") T moveToBottom(); @Override @SuppressWarnings("unchecked") T moveUp(); @Override @SuppressWarnings("unchecked") T moveDown(); @Override @SuppressWarnings("unchecked") T showControlPoints(final ControlPointType type); @Override @SuppressWarnings("unchecked") T hideControlPoints(); @Override boolean areControlsVisible(); @Override List<Shape<?>> getDecorators(); @Override BoundingBox getBoundingBox(); @Override void removeFromParent(); @Override T setShadow(final String color,
                       final int blur,
                       final double offx,
                       final double offy); @Override T removeShadow(); T setDashArray(DashArray dashArray); @Override Object getUserData(); @Override void setUserData(Object userData);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testAddControlPoint() { Point2DArray cps = new Point2DArray(new Point2D(0, 0), new Point2D(0.1, 0.2), new Point2D(1, 2)); when(line.getPoint2DArray()).thenReturn(cps); ControlPoint newCP = ControlPoint.build(0.5, 0.5); tested.addControlPoint(newCP, 1); ArgumentCaptor<Point2DArray> linePointsCaptor = ArgumentCaptor.forClass(Point2DArray.class); verify(line, atLeastOnce()).setPoint2DArray(linePointsCaptor.capture()); Point2DArray linePoints = linePointsCaptor.getValue(); assertEquals(4, linePoints.size()); assertEquals(new Point2D(0.1, 0.2), linePoints.get(1)); assertEquals(new Point2D(0.5, 0.5), linePoints.get(2)); }