### Question:
AbstractConnectorView extends WiresConnectorViewExt<AbstractConnectorView> { static Object[] createLine(LineConnectorFactory lineFactory, ConnectorShapeDef.Direction direction, final double... points) { final MultiPath head = BOTH.equals(direction) ? getArrowMultiPath() : new MultiPath(); final MultiPath tail = BOTH.equals(direction) || ONE.equals(direction) ? getArrowMultiPath() : new MultiPath(); final AbstractDirectionalMultiPointShape<?> line = lineFactory.createLine(Point2DArray.fromArrayOfDouble(points)); line.setDraggable(true); line.setSelectionStrokeOffset(SELECTION_OFFSET); line.setHeadOffset(head.getBoundingBox().getHeight()); line.setTailOffset(tail.getBoundingBox().getHeight()); final MultiPathDecorator headDecorator = new MultiPathDecorator(head); final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail); return new Object[]{line, headDecorator, tailDecorator}; } AbstractConnectorView(LineConnectorFactory lineFactory, final ConnectorShapeDef.Direction direction,
                                 final double... points); private  AbstractConnectorView(final Object[] line);   }### Answer:
@Test public void createLineOne() { Object[] line = AbstractConnectorView.createLine(lineFactory, ConnectorShapeDef.Direction.ONE, 0d, 1d); MultiPathDecorator headDecorator = (MultiPathDecorator) line[1]; MultiPathDecorator tailDecorator = (MultiPathDecorator) line[2]; assertEquals(headDecorator.getPath().getBoundingBox(), emptyBoundingBox()); assertNotEquals(tailDecorator.getPath().getBoundingBox(), emptyBoundingBox()); }
@Test public void createLineBoth() { Object[] line = AbstractConnectorView.createLine(lineFactory, ConnectorShapeDef.Direction.BOTH, 0d, 1d); MultiPathDecorator headDecorator = (MultiPathDecorator) line[1]; MultiPathDecorator tailDecorator = (MultiPathDecorator) line[2]; assertNotEquals(headDecorator.getPath().getBoundingBox(), emptyBoundingBox()); assertNotEquals(tailDecorator.getPath().getBoundingBox(), emptyBoundingBox()); }
@Test public void createLineNone() { Object[] line = AbstractConnectorView.createLine(lineFactory, ConnectorShapeDef.Direction.NONE, 0d, 1d); MultiPathDecorator headDecorator = (MultiPathDecorator) line[1]; MultiPathDecorator tailDecorator = (MultiPathDecorator) line[2]; assertEquals(headDecorator.getPath().getBoundingBox(), emptyBoundingBox()); assertEquals(tailDecorator.getPath().getBoundingBox(), emptyBoundingBox()); }
@Test public void createLineNull() { Object[] line = AbstractConnectorView.createLine(lineFactory, null, 0d, 1d); MultiPathDecorator headDecorator = (MultiPathDecorator) line[1]; MultiPathDecorator tailDecorator = (MultiPathDecorator) line[2]; assertEquals(headDecorator.getPath().getBoundingBox(), emptyBoundingBox()); assertEquals(tailDecorator.getPath().getBoundingBox(), emptyBoundingBox()); }