static MinMax findMinMax(MinMax minMax, List<Statement> statements, EncodedValueLookup lookup) {
        List<List<Statement>> groups = CustomModelParser.splitIntoGroup(statements);
        for (List<Statement> group : groups) findMinMaxForGroup(minMax, group, lookup);
        return minMax;
    }
@Test
    public void testFindMax() {
        List<Statement> statements = new ArrayList<>();
        statements.add(If("true", LIMIT, "100"));
        assertEquals(100, findMinMax(new MinMax(0, 120), statements, lookup).max);

        statements.add(Else(LIMIT, "20"));
        assertEquals(100, findMinMax(new MinMax(0, 120), statements, lookup).max);

        statements = new ArrayList<>();
        statements.add(If("road_environment == BRIDGE", LIMIT, "85"));
        statements.add(Else(LIMIT, "100"));
        assertEquals(100, findMinMax(new MinMax(0, 120), statements, lookup).max);

        // find bigger speed than stored max_speed (30) in server-side custom_models
        statements = new ArrayList<>();
        statements.add(If("true", MULTIPLY, "2"));
        statements.add(If("true", LIMIT, "35"));
        assertEquals(35, findMinMax(new MinMax(0, 30), statements, lookup).max);
    }