// Path: src/main/java/com/github/jankroken/commandline/domain/internal/OptionSpecificationFactory.java
// public class OptionSpecificationFactory {
// 
// 
//     public static OptionSpecification getOptionSpecification(Object spec, Method method) {
//         var builder = new OptionSpecificationBuilder();
//         builder.addMethod(method);
//         builder.addConfiguration(spec);
//         for (var annotation : method.getAnnotations()) {
//             if (annotation instanceof Option) {
//             } else if (annotation instanceof LongSwitch) {
//                 builder.addLongSwitch(((LongSwitch) annotation).value());
//             } else if (annotation instanceof ShortSwitch) {
//                 builder.addShortSwitch(((ShortSwitch) annotation).value());
//             } else if (annotation instanceof Toggle) {
//                 builder.addToggle(((Toggle) annotation).value());
//             } else if (annotation instanceof SingleArgument) {
//                 builder.addSingleArgument();
//             } else if (annotation instanceof AllAvailableArguments) {
//                 builder.addAllAvailableArguments();
//             } else if (annotation instanceof ArgumentsUntilDelimiter) {
//                 builder.addUntilDelimiter(((ArgumentsUntilDelimiter) annotation).value());
//             } else if (annotation instanceof SubConfiguration) {
//                 builder.addSubset(((SubConfiguration) annotation).value());
//             } else if (annotation instanceof Required) {
//                 builder.addRequired();
//             } else if (annotation instanceof Multiple) {
//                 builder.addOccurrences(Occurrences.MULTIPLE);
//             } else if (annotation instanceof LooseArguments) {
//                 builder.addLooseArgs();
//             } else {
//                 // todo
//                 System.out.println("Unhandled annotation: " + annotation);
//             }
//         }
//         return builder.getOptionSpecification();
// 
//     }
// 
//     public static List<OptionSpecification> getOptionSpecifications(Object spec, Class<?> optionClass) {
//         var methods = new Methods(optionClass).byAnnotation(Option.class);
//         List<OptionSpecification> optionSpecifications = new ArrayList<>();
//         for (var method : methods) {
//             optionSpecifications.add(getOptionSpecification(spec, method));
//         }
//         return optionSpecifications;
//     }
// }


import com.github.jankroken.commandline.domain.internal.OptionSpecificationFactory;
import com.github.jankroken.commandline.happy.SimpleConfiguration;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
package com.github.jankroken.commandline.domain;



public class OptionSpecificationFactoryTest {

    @Test
    public void testOptionSpecificationFactory() {
// Path: src/main/java/com/github/jankroken/commandline/domain/internal/OptionSpecificationFactory.java
// public class OptionSpecificationFactory {
// 
// 
//     public static OptionSpecification getOptionSpecification(Object spec, Method method) {
//         var builder = new OptionSpecificationBuilder();
//         builder.addMethod(method);
//         builder.addConfiguration(spec);
//         for (var annotation : method.getAnnotations()) {
//             if (annotation instanceof Option) {
//             } else if (annotation instanceof LongSwitch) {
//                 builder.addLongSwitch(((LongSwitch) annotation).value());
//             } else if (annotation instanceof ShortSwitch) {
//                 builder.addShortSwitch(((ShortSwitch) annotation).value());
//             } else if (annotation instanceof Toggle) {
//                 builder.addToggle(((Toggle) annotation).value());
//             } else if (annotation instanceof SingleArgument) {
//                 builder.addSingleArgument();
//             } else if (annotation instanceof AllAvailableArguments) {
//                 builder.addAllAvailableArguments();
//             } else if (annotation instanceof ArgumentsUntilDelimiter) {
//                 builder.addUntilDelimiter(((ArgumentsUntilDelimiter) annotation).value());
//             } else if (annotation instanceof SubConfiguration) {
//                 builder.addSubset(((SubConfiguration) annotation).value());
//             } else if (annotation instanceof Required) {
//                 builder.addRequired();
//             } else if (annotation instanceof Multiple) {
//                 builder.addOccurrences(Occurrences.MULTIPLE);
//             } else if (annotation instanceof LooseArguments) {
//                 builder.addLooseArgs();
//             } else {
//                 // todo
//                 System.out.println("Unhandled annotation: " + annotation);
//             }
//         }
//         return builder.getOptionSpecification();
// 
//     }
// 
//     public static List<OptionSpecification> getOptionSpecifications(Object spec, Class<?> optionClass) {
//         var methods = new Methods(optionClass).byAnnotation(Option.class);
//         List<OptionSpecification> optionSpecifications = new ArrayList<>();
//         for (var method : methods) {
//             optionSpecifications.add(getOptionSpecification(spec, method));
//         }
//         return optionSpecifications;
//     }
// }


// Path: src/test/java/com/github/jankroken/commandline/domain/OptionSpecificationFactoryTest.java
import com.github.jankroken.commandline.domain.internal.OptionSpecificationFactory;
import com.github.jankroken.commandline.happy.SimpleConfiguration;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;

package com.github.jankroken.commandline.domain;



public class OptionSpecificationFactoryTest {

    @Test
    public void testOptionSpecificationFactory() {
        var conf = new SimpleConfiguration();