@Override
    public Path calcPath(int from, int to) {
        setupFinishTime();
        fromNode = from;
        endNode = findEndNode(from, to);
        if (endNode < 0 || isWeightLimitExceeded()) {
            Path path = createEmptyPath();
            path.setFromNode(fromNode);
            path.setEndNode(endNode);
            return path;
        }

        Path path = new Path(graph);
        int node = endNode;
        while (true) {
            int edge = edgeIds[node];
            if (!EdgeIterator.Edge.isValid(edge)) {
                break;
            }
            EdgeIteratorState edgeState = graph.getEdgeIteratorState(edge, node);
            path.addDistance(edgeState.getDistance());
            // todo: we do not yet account for turn times here!
            path.addTime(weighting.calcEdgeMillis(edgeState, false));
            path.addEdge(edge);
            node = parents[node];
        }
        ArrayUtil.reverse(path.getEdges());
        path.setFromNode(fromNode);
        path.setEndNode(endNode);
        path.setFound(true);
        path.setWeight(weights[endNode]);
        return path;
    }
@Test
    public void testIssue182() {
        BaseGraph graph = createGHStorage();
        initGraph(graph);
        Path p = calcPath(graph, 0, 8);
        assertEquals(IntArrayList.from(0, 7, 8), p.calcNodes());

        // expand SPT
        p = calcPath(graph, 0, 10);
        assertEquals(IntArrayList.from(0, 1, 2, 3, 4, 10), p.calcNodes());
    }