static CliArguments fromRawArgs(String[] rawArgs) throws CliArgumentsException {
        CommandLineParser parser = new DefaultParser();
        try {
            return new CliArguments(parser.parse(optionsDefinition, rawArgs));
        } catch (ParseException e) {
            throw new CliArgumentsException(e);
        }
    }
@Test
    void fails_on_missing_parameters() {
        CliArguments.CliArgumentsException exception = assertThrows(
                CliArguments.CliArgumentsException.class,
                () -> CliArguments.fromRawArgs(new String[] {"--file", "/path/to/file", "--stdin"}));
        assertEquals("Endpoint must be specified", exception.getMessage());
    }