// Path: datagen/src/main/java/io/qala/datagen/RandomShortApi.java
// public static String blankOr(String string) {
//     return sample(nullOrBlank(), string);
// }
// 
// Path: datagen/src/main/java/io/qala/datagen/RandomShortApi.java
// public static String english(int exactLength) {
//     return length(exactLength).english();
// }


import org.apache.commons.lang3.StringUtils;
import static io.qala.datagen.RandomShortApi.blankOr;
import static io.qala.datagen.RandomShortApi.english;
    }

    Person lastName(String lastName) {
        this.lastName = lastName;
        return this;
    }
    String lastName() {
        return lastName;
    }

    String username() { return username; }

    Person country(Country country) {//String - not Country
        this.country = country;
        return this;
    }
    Country country() {
        return country;
    }

    private static final int USERNAME_MAX_LENGTH = 20;
    void validate() throws IllegalStateException {
        if (StringUtils.isBlank(username()))
            throw new IllegalStateException("Java Constraints violation: username is mandatory! Passed: [" + username() + "]");
        if (username().length() > USERNAME_MAX_LENGTH)
            throw new IllegalStateException("Java Constraints violation: username [" + username() + "] cannot be more than " + USERNAME_MAX_LENGTH + "!");
    }

    static Person random() {
        return new Person(english(1, 20)).country(Country.random())
// Path: datagen/src/main/java/io/qala/datagen/RandomShortApi.java
// public static String blankOr(String string) {
//     return sample(nullOrBlank(), string);
// }
// 
// Path: datagen/src/main/java/io/qala/datagen/RandomShortApi.java
// public static String english(int exactLength) {
//     return length(exactLength).english();
// }


// Path: examples/src/main/java/io/qala/datagen/examples/Person.java
import org.apache.commons.lang3.StringUtils;
import static io.qala.datagen.RandomShortApi.blankOr;
import static io.qala.datagen.RandomShortApi.english;

    }

    Person lastName(String lastName) {
        this.lastName = lastName;
        return this;
    }
    String lastName() {
        return lastName;
    }

    String username() { return username; }

    Person country(Country country) {//String - not Country
        this.country = country;
        return this;
    }
    Country country() {
        return country;
    }

    private static final int USERNAME_MAX_LENGTH = 20;
    void validate() throws IllegalStateException {
        if (StringUtils.isBlank(username()))
            throw new IllegalStateException("Java Constraints violation: username is mandatory! Passed: [" + username() + "]");
        if (username().length() > USERNAME_MAX_LENGTH)
            throw new IllegalStateException("Java Constraints violation: username [" + username() + "] cannot be more than " + USERNAME_MAX_LENGTH + "!");
    }

    static Person random() {
        return new Person(english(1, 20)).country(Country.random())
                .firstName(blankOr(english(1, 20))).lastName(blankOr(english(1, 20)));