### Question:
FlexibleWay implements ConnectableSegment { @Override public ConnectableNode getEndpointNodes() { return endpointNodes; } FlexibleWay(List<Node> nodes); @Override SegmentNodes getSegmentNodes(); @Override ConnectableNode getEndpointNodes(); @Override Set<Node> getCommonNode(ConnectableSegment otherSegment); @Override boolean canConnect(ConnectableSegment otherSegment); @Override void appendNodesBetween(Collection<Node> nodes, Node startNode, Node endNode); @Override boolean containsNodes(Node... nodes); @Override boolean canConnectNodesInDirection(Node startNode, Node endNode); @Override double getLength();  }### Answer:
@Test public void testGetEndPointNodes() throws Exception { ConnectableNode endpointNodesReverse = flexibleWay.getEndpointNodes(); assertTrue(endpointNodesReverse.contains(getNode(1))); assertTrue(endpointNodesReverse.contains(getNode(2))); assertTrue(endpointNodesReverse.contains(getNode(3))); assertTrue(endpointNodesReverse.contains(getNode(4))); }