// Path: egtest-annotations/src/main/java/com/vocalabs/egtest/annotation/EgLanguage.java
// public enum EgLanguage {
//     /** Use the default language specified at a higher level, typically JAVA. */
//     INHERIT,
//     /** Java, copied verbatim into test code. */
//     JAVA,
// 
//     /**
//      * Produce Groovy embedded in Java. May produce simple Java rather than embedding a Groovy interpreter for simple
//      * cases such as primitives.
//      */
//     GROOVY,
// 
//     /** Produce Kotlin source code within Kotlin source files. Can't be mixed with JAVA or GROOVY within a file. */
//     KOTLIN
// }


import com.vocalabs.egtest.annotation.Eg;
import com.vocalabs.egtest.annotation.EgLanguage;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.stream.Collectors;
package com.vocalabs.egtest.example;



/**
 * Example of EgTests which are better suited for Groovy.
 */
public class GroovyExample {

    @Eg( language = EgLanguage.GROOVY,
            given = "['Elephant', 'Octopus', 'Noodles']", returns = "['Eea', 'Oou', 'oe']")
    public static List<String> vowels(Collection<String> words) {
        return words.stream()
                .map(GroovyExample::vowels)
                .map(GroovyExample::charsToString)
                .collect(Collectors.toList());
    }

    /** Returns a sorted set of vowels for each of the words */
    static Set<Character> vowels(String words) {
        return words
                .chars()
                .filter(it -> isVowel((char) it))
                .mapToObj(it -> (char)it)
                .collect(Collectors.toCollection(LinkedHashSet::new));
    }


// Path: egtest-annotations/src/main/java/com/vocalabs/egtest/annotation/EgLanguage.java
// public enum EgLanguage {
//     /** Use the default language specified at a higher level, typically JAVA. */
//     INHERIT,
//     /** Java, copied verbatim into test code. */
//     JAVA,
// 
//     /**
//      * Produce Groovy embedded in Java. May produce simple Java rather than embedding a Groovy interpreter for simple
//      * cases such as primitives.
//      */
//     GROOVY,
// 
//     /** Produce Kotlin source code within Kotlin source files. Can't be mixed with JAVA or GROOVY within a file. */
//     KOTLIN
// }


// Path: junit-example/src/main/java/com/vocalabs/egtest/example/GroovyExample.java
import com.vocalabs.egtest.annotation.Eg;
import com.vocalabs.egtest.annotation.EgLanguage;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.stream.Collectors;

package com.vocalabs.egtest.example;



/**
 * Example of EgTests which are better suited for Groovy.
 */
public class GroovyExample {

    @Eg( language = EgLanguage.GROOVY,
            given = "['Elephant', 'Octopus', 'Noodles']", returns = "['Eea', 'Oou', 'oe']")
    public static List<String> vowels(Collection<String> words) {
        return words.stream()
                .map(GroovyExample::vowels)
                .map(GroovyExample::charsToString)
                .collect(Collectors.toList());
    }

    /** Returns a sorted set of vowels for each of the words */
    static Set<Character> vowels(String words) {
        return words
                .chars()
                .filter(it -> isVowel((char) it))
                .mapToObj(it -> (char)it)
                .collect(Collectors.toCollection(LinkedHashSet::new));
    }


    @Eg(language = EgLanguage.GROOVY, given = "'a'", returns = "true")