public Path setDistance(double distance) {
        this.distance = distance;
        return this;
    }
@Test
    public void testFindInstruction() {
        BaseGraph g = new BaseGraph.Builder(carManager).create();
        NodeAccess na = g.getNodeAccess();
        na.setNode(0, 0.0, 0.0);
        na.setNode(1, 5.0, 0.0);
        na.setNode(2, 5.0, 0.5);
        na.setNode(3, 10.0, 0.5);
        na.setNode(4, 7.5, 0.25);
        na.setNode(5, 5.0, 1.0);

        EdgeIteratorState edge1 = g.edge(0, 1).setDistance(1000).set(carAvSpeedEnc, 50.0, 50.0);
        edge1.setWayGeometry(Helper.createPointList());
        edge1.setKeyValues(Map.of(STREET_NAME, new KValue( "Street 1")));
        EdgeIteratorState edge2 = g.edge(1, 2).setDistance(1000).set(carAvSpeedEnc, 50.0, 50.0);
        edge2.setWayGeometry(Helper.createPointList());
        edge2.setKeyValues(Map.of(STREET_NAME, new KValue( "Street 2")));
        EdgeIteratorState edge3 = g.edge(2, 3).setDistance(1000).set(carAvSpeedEnc, 50.0, 50.0);
        edge3.setWayGeometry(Helper.createPointList());
        edge3.setKeyValues(Map.of(STREET_NAME, new KValue( "Street 3")));
        EdgeIteratorState edge4 = g.edge(3, 4).setDistance(500).set(carAvSpeedEnc, 50.0, 50.0);
        edge4.setWayGeometry(Helper.createPointList());
        edge4.setKeyValues(Map.of(STREET_NAME, new KValue( "Street 4")));

        g.edge(1, 5).setDistance(10000).set(carAvSpeedEnc, 50.0, 50.0);
        g.edge(2, 5).setDistance(10000).set(carAvSpeedEnc, 50.0, 50.0);
        g.edge(3, 5).setDistance(100000).set(carAvSpeedEnc, 50.0, 50.0);

        SPTEntry e1 =
                new SPTEntry(edge4.getEdge(), 4, 1,
                        new SPTEntry(edge3.getEdge(), 3, 1,
                                new SPTEntry(edge2.getEdge(), 2, 1,
                                        new SPTEntry(edge1.getEdge(), 1, 1,
                                                new SPTEntry(0, 1)
                                        ))));
        Weighting weighting = new SpeedWeighting(carAvSpeedEnc);
        Path path = extractPath(g, weighting, e1);

        InstructionList il = InstructionsFromEdges.calcInstructions(path, path.graph, weighting, carManager, tr);
        assertEquals(5, il.size());
        assertEquals(Instruction.CONTINUE_ON_STREET, il.get(0).getSign());
        assertEquals(Instruction.TURN_RIGHT, il.get(1).getSign());
        assertEquals(Instruction.TURN_LEFT, il.get(2).getSign());
        assertEquals(Instruction.TURN_SHARP_LEFT, il.get(3).getSign());
        assertEquals(Instruction.FINISH, il.get(4).getSign());
    }