static ParseResult parse(final int javaMajorVersion, final BufferedReader br) throws IOException {
        final ParseResult result = new ParseResult();
        int lineNumber = 0;
        while (true) {
            final String line = br.readLine();
            lineNumber++;
            if (line == null) {
                break;
            }
            try{
                jvmOptionFromLine(javaMajorVersion, line).ifPresent(result::appendOption);
            } catch (IllegalArgumentException e){
                result.appendError(lineNumber, line);
            };
        }
        return result;
    }
@Test
    public void testParseOptionVersionRange() throws IOException {
        JvmOptionsParser.ParseResult res = JvmOptionsParser.parse(11, asReader("10-11:-XX:+UseConcMarkSweepGC"));
        verifyOptions("Option must be present for Java 11", "-XX:+UseConcMarkSweepGC", res);

        res = JvmOptionsParser.parse(14, asReader("10-11:-XX:+UseConcMarkSweepGC"));
        assertTrue("No option match outside the range [10-11]", res.getJvmOptions().isEmpty());
    }