### Question:
TraverseService { public List<Node> fillInNodes(List<Node> path, Collection<ConnectableSegment> segments) { if (path.isEmpty()) return path; List<ConnectableSegment> modifyableSegments = new ArrayList<ConnectableSegment>(segments); List<Node> result = new ArrayList<Node>(); Node startNode = path.get(0); result.add(startNode); for (int x = 1; x < path.size(); x++) { Node currentNode = path.get(x); fillInNodesBetweenNodes(modifyableSegments, result, startNode, currentNode); startNode = currentNode; } return result; }  List<Node> traverse(IntersectionNode startNode, IntersectionNode endNode); List<Node> traverse(Graph graph, IntersectionNode startNode, IntersectionNode endNode); List<Node> fillInNodes(List<Node> path, Collection<ConnectableSegment> segments); static void fillInNodesBetweenNodes(List<ConnectableSegment> modifyableSegments, List<Node> resultNodes,
			Node startNode, Node currentNode);  }### Answer:
@Test public void testFillInNodes() throws Exception { List<Node> list = TestUtils.asNodes(1, 3, 1); List<ConnectableSegment> segments = TestUtils .asSegments(TestUtils.asNodes(1, 2, 3), TestUtils.asNodes(3, 4, 1)); List<Node> nodes = traverseService.fillInNodes(list, segments); for (int x = 1; x <= 4; x++) assertTrue("should contain node id: " + x, nodes.contains(TestUtils.getNode(x))); }