### Question:
SingleRouteTraverser { public List<Node> getPath() { return path; } SingleRouteTraverser(IntersectionNode startNode, IntersectionNode endNode); List<Node> getPath();  }### Answer:
@Test public void testTraverseOrderAtoB() throws Exception { SingleRouteTraverser traverser = new SingleRouteTraverser(nodeA, nodeB); List<Node> nodes = traverser.getPath(); assertEquals(nodeA.getNode(), nodes.get(0)); assertEquals(nodeB.getNode(), nodes.get(4)); }
@Test public void testTraverseOrderBtoA() throws Exception { SingleRouteTraverser traverser = new SingleRouteTraverser(nodeB, nodeA); List<Node> nodes = traverser.getPath(); assertEquals(nodeB.getNode(), nodes.get(0)); assertEquals(nodeA.getNode(), nodes.get(4)); }