### Question:
FlexibleWay implements ConnectableSegment { @Override public boolean containsNodes(Node... nodes) { for (Node node : nodes) { if (!wayNodes.contains(node)) return false; } return true; } 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 testContainsNodes() throws Exception { assertTrue(flexibleWay.containsNodes(getNode(1), getNode(2), getNode(3), getNode(4))); assertFalse(flexibleWay.containsNodes(getNode(5), getNode(6), getNode(7), getNode(8))); }