private long parseTimeoutMs() {
        long timeout = options.has(timeoutMsOpt) ? options.valueOf(timeoutMsOpt) : -1;
        return timeout >= 0 ? timeout : Long.MAX_VALUE;
    }
@Test
    public void testParseTimeoutMs() throws Exception {
        String[] withoutTimeoutMs = new String[]{
            "--bootstrap-server", "localhost:9092",
            "--topic", "test",
            "--partition", "0"
        };
        assertEquals(Long.MAX_VALUE, new ConsoleConsumerOptions(withoutTimeoutMs).timeoutMs());

        String[] negativeTimeoutMs = new String[]{
            "--bootstrap-server", "localhost:9092",
            "--topic", "test",
            "--partition", "0",
            "--timeout-ms", "-100"
        };
        assertEquals(Long.MAX_VALUE, new ConsoleConsumerOptions(negativeTimeoutMs).timeoutMs());

        String[] validTimeoutMs = new String[]{
            "--bootstrap-server", "localhost:9092",
            "--topic", "test",
            "--partition", "0",
            "--timeout-ms", "100"
        };
        assertEquals(100, new ConsoleConsumerOptions(validTimeoutMs).timeoutMs());
    }