@Override
    public void handleWayTags(int edgeId, EdgeIntAccess edgeIntAccess, ReaderWay way, IntsRef relationFlags) {
        int laneCount = 1;
        if (way.hasTag("lanes")) {
            String noLanes = way.getTag("lanes");
            String[] noLanesTok = noLanes.split(";|\\.");
            if (noLanesTok.length > 0) {
                try {
                    int noLanesInt = Integer.parseInt(noLanesTok[0]);
                    // there was a proposal with negative lanes but I cannot find it
                    if (noLanesInt < 0)
                        laneCount = 1;
                    else if (noLanesInt > 6)
                        laneCount = 6;
                    else
                        laneCount = noLanesInt;
                } catch (NumberFormatException ex) {
                    // ignore if no number
                }
            }
        }
        lanesEnc.setInt(false, edgeId, edgeIntAccess, laneCount);
    }
@Test
    void basic() {
        ReaderWay readerWay = new ReaderWay(1);
        EdgeIntAccess edgeIntAccess = new ArrayEdgeIntAccess(1);
        int edgeId = 0;
        readerWay.setTag("lanes", "4");
        parser.handleWayTags(edgeId, edgeIntAccess, readerWay, relFlags);
        Assertions.assertEquals(4, lanesEnc.getInt(false, edgeId, edgeIntAccess));
    }