// Path: src/main/java/com/github/jankroken/commandline/CommandLineParser.java
// public static <T> T parse(Class<T> optionClass, String[] args, OptionStyle style)
//         throws IllegalAccessException, InstantiationException, InvocationTargetException {
//     T spec;
//     try {
//         spec = optionClass.getConstructor().newInstance();
//     } catch (NoSuchMethodException noSuchMethodException) {
//         throw new RuntimeException(noSuchMethodException);
//     }
//     var optionSet = new OptionSet(spec, MAIN_OPTIONS);
//     Tokenizer tokenizer;
//     if (style == SIMPLE) {
//         tokenizer = new SimpleTokenizer(new PeekIterator<>(new ArrayIterator<>(args)));
//     } else {
//         tokenizer = new LongOrCompactTokenizer(new PeekIterator<>(new ArrayIterator<>(args)));
//     }
//     optionSet.consumeOptions(tokenizer);
//     return spec;
// }


import org.junit.jupiter.api.Test;
import static com.github.jankroken.commandline.CommandLineParser.parse;
import static com.github.jankroken.commandline.OptionStyle.SIMPLE;
import static org.assertj.core.api.Assertions.assertThat;
package com.github.jankroken.commandline.happy;




public class SimpleParserTest {

    @Test
    public void testSimpleConfiguration() throws Exception {
        final var args = new String[]{"-f", "hello.txt", "-v"};
// Path: src/main/java/com/github/jankroken/commandline/CommandLineParser.java
// public static <T> T parse(Class<T> optionClass, String[] args, OptionStyle style)
//         throws IllegalAccessException, InstantiationException, InvocationTargetException {
//     T spec;
//     try {
//         spec = optionClass.getConstructor().newInstance();
//     } catch (NoSuchMethodException noSuchMethodException) {
//         throw new RuntimeException(noSuchMethodException);
//     }
//     var optionSet = new OptionSet(spec, MAIN_OPTIONS);
//     Tokenizer tokenizer;
//     if (style == SIMPLE) {
//         tokenizer = new SimpleTokenizer(new PeekIterator<>(new ArrayIterator<>(args)));
//     } else {
//         tokenizer = new LongOrCompactTokenizer(new PeekIterator<>(new ArrayIterator<>(args)));
//     }
//     optionSet.consumeOptions(tokenizer);
//     return spec;
// }


// Path: src/test/java/com/github/jankroken/commandline/happy/SimpleParserTest.java
import org.junit.jupiter.api.Test;
import static com.github.jankroken.commandline.CommandLineParser.parse;
import static com.github.jankroken.commandline.OptionStyle.SIMPLE;
import static org.assertj.core.api.Assertions.assertThat;

package com.github.jankroken.commandline.happy;




public class SimpleParserTest {

    @Test
    public void testSimpleConfiguration() throws Exception {
        final var args = new String[]{"-f", "hello.txt", "-v"};
        final var config = parse(SimpleConfiguration.class, args, SIMPLE);