// Path: src/main/java/au/com/anthonybruno/Gen.java
// public class Gen implements FileTypeDefinition, ResultDefinition, StartDefinition, RecordDefinition, FieldDefinition {
// 
//     private int numToGenerate;
//     private FileFactory fileFactory;
// 
//     private Class<?> useClass;
//     private List<FieldData> fields = new ArrayList<>();
// 
//     public static StartDefinition start() {
//         return new Gen();
//     }
// 
//     private Gen() {
// 
//     }
// 
// 
//     @Override
//     public RecordDefinition use(Class<?> c) {
//         useClass = c;
//         return this;
//     }
// 
//     @Override
//     public FieldDefinition addField(String name, Generator generator) {
//         ArgumentUtils.isNotNull(generator, "Can not add '" + name + "' field with null generator");
//         fields.add(new FieldData(name, generator));
//         return this;
//     }
// 
//     @Override
//     public ResultDefinition asCsv() {
//         return asCsv(new CsvSettings.Builder().build());
//     }
// 
//     @Override
//     public ResultDefinition asCsv(CsvSettings csvSettings) {
//         fileFactory = new CsvFactory(csvSettings, createRecordFactory());
//         return this;
//     }
// 
//     @Override
//     public ResultDefinition asFixedWidth(FixedWidthSettings fixedWidthSettings) {
//         fileFactory = new FixedWidthFactory(fixedWidthSettings, createRecordFactory());
//         return this;
//     }
// 
//     @Override
//     public File toFile(File file) {
//         return fileFactory.createFile(file, numToGenerate);
//     }
// 
//     @Override
//     public File toFile(String path) {
//         return toFile(new File(path));
//     }
// 
//     @Override
//     public String toStringForm() {
//         checkSetup();
//         return fileFactory.createString(numToGenerate);
//     }
// 
//     @Override
//     public FileTypeDefinition generate(int num) {
//         this.numToGenerate = num;
//         return this;
//     }
// 
//     private RecordFactory createRecordFactory() {
//         if (useClass != null) {
//             return new ClassRecordFactory(useClass);
//         } else if (!fields.isEmpty()){
//             return new FieldsRecordFactory(fields);
//         } else {
//             throw new IllegalStateException("No fields or class added to generator");
//         }
//     }
// 
//     private void checkSetup() {
//         if (useClass == null && fields.isEmpty()) {
//             throw new IllegalStateException("No generation fields or class specified! Please utilise the #use or #addField methods!");
//         }
// 
//         if (fileFactory == null) {
//             throw new IllegalStateException("No file type specified! Use one of the 'as' methods such as #asCsv()");
//         }
// 
//         if (numToGenerate <= 0) {
//             throw new IllegalStateException("Need to specify a positive non-zero number of records to generate!");
//         }
//     }
// 
// 
// }
// 
// Path: src/main/java/au/com/anthonybruno/settings/CsvSettings.java
// public class CsvSettings extends FlatFileSettings {
// 
//     public static final char DEFAULT_DELIMITER = ',';
// 
//     private final char delimiter;
// 
//     public CsvSettings(boolean includeHeaders) {
//         this(includeHeaders, DEFAULT_DELIMITER);
//     }
// 
//     public CsvSettings(boolean includeHeaders, char delimiter) {
//         super(includeHeaders);
//         this.delimiter = delimiter;
//     }
// 
//     public char getDelimiter() {
//         return delimiter;
//     }
// 
//     public static class Builder {
//         private char delimiter = DEFAULT_DELIMITER;
//         private boolean includeHeaders = true;
// 
//         public Builder setDelimiter(char delimiter) {
//             this.delimiter = delimiter;
//             return this;
//         }
// 
//         public Builder setIncludeHeaders(boolean includeHeaders) {
//             this.includeHeaders = includeHeaders;
//             return this;
//         }
// 
//         public CsvSettings build() {
//             return new CsvSettings(includeHeaders, delimiter);
//         }
//     }
// 
// }


import au.com.anthonybruno.Gen;
import au.com.anthonybruno.settings.CsvSettings;
import com.univocity.parsers.csv.CsvParser;
import com.univocity.parsers.csv.CsvParserSettings;
import org.junit.Test;
import java.io.StringReader;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import static junit.framework.TestCase.assertFalse;
import static org.junit.Assert.*;
package au.com.anthonybruno.annotated;




public class GeneratorAnnotationTest {

    public static final int minAge = 18;
    public static final int maxAge = 80;


    @Test
    public void notEmpty() {
        String result = generateAnnotatedPersonCsv();
        assertFalse(result.isEmpty());
    }

    @Test
    public void correctHeaders() {
// Path: src/main/java/au/com/anthonybruno/Gen.java
// public class Gen implements FileTypeDefinition, ResultDefinition, StartDefinition, RecordDefinition, FieldDefinition {
// 
//     private int numToGenerate;
//     private FileFactory fileFactory;
// 
//     private Class<?> useClass;
//     private List<FieldData> fields = new ArrayList<>();
// 
//     public static StartDefinition start() {
//         return new Gen();
//     }
// 
//     private Gen() {
// 
//     }
// 
// 
//     @Override
//     public RecordDefinition use(Class<?> c) {
//         useClass = c;
//         return this;
//     }
// 
//     @Override
//     public FieldDefinition addField(String name, Generator generator) {
//         ArgumentUtils.isNotNull(generator, "Can not add '" + name + "' field with null generator");
//         fields.add(new FieldData(name, generator));
//         return this;
//     }
// 
//     @Override
//     public ResultDefinition asCsv() {
//         return asCsv(new CsvSettings.Builder().build());
//     }
// 
//     @Override
//     public ResultDefinition asCsv(CsvSettings csvSettings) {
//         fileFactory = new CsvFactory(csvSettings, createRecordFactory());
//         return this;
//     }
// 
//     @Override
//     public ResultDefinition asFixedWidth(FixedWidthSettings fixedWidthSettings) {
//         fileFactory = new FixedWidthFactory(fixedWidthSettings, createRecordFactory());
//         return this;
//     }
// 
//     @Override
//     public File toFile(File file) {
//         return fileFactory.createFile(file, numToGenerate);
//     }
// 
//     @Override
//     public File toFile(String path) {
//         return toFile(new File(path));
//     }
// 
//     @Override
//     public String toStringForm() {
//         checkSetup();
//         return fileFactory.createString(numToGenerate);
//     }
// 
//     @Override
//     public FileTypeDefinition generate(int num) {
//         this.numToGenerate = num;
//         return this;
//     }
// 
//     private RecordFactory createRecordFactory() {
//         if (useClass != null) {
//             return new ClassRecordFactory(useClass);
//         } else if (!fields.isEmpty()){
//             return new FieldsRecordFactory(fields);
//         } else {
//             throw new IllegalStateException("No fields or class added to generator");
//         }
//     }
// 
//     private void checkSetup() {
//         if (useClass == null && fields.isEmpty()) {
//             throw new IllegalStateException("No generation fields or class specified! Please utilise the #use or #addField methods!");
//         }
// 
//         if (fileFactory == null) {
//             throw new IllegalStateException("No file type specified! Use one of the 'as' methods such as #asCsv()");
//         }
// 
//         if (numToGenerate <= 0) {
//             throw new IllegalStateException("Need to specify a positive non-zero number of records to generate!");
//         }
//     }
// 
// 
// }
// 
// Path: src/main/java/au/com/anthonybruno/settings/CsvSettings.java
// public class CsvSettings extends FlatFileSettings {
// 
//     public static final char DEFAULT_DELIMITER = ',';
// 
//     private final char delimiter;
// 
//     public CsvSettings(boolean includeHeaders) {
//         this(includeHeaders, DEFAULT_DELIMITER);
//     }
// 
//     public CsvSettings(boolean includeHeaders, char delimiter) {
//         super(includeHeaders);
//         this.delimiter = delimiter;
//     }
// 
//     public char getDelimiter() {
//         return delimiter;
//     }
// 
//     public static class Builder {
//         private char delimiter = DEFAULT_DELIMITER;
//         private boolean includeHeaders = true;
// 
//         public Builder setDelimiter(char delimiter) {
//             this.delimiter = delimiter;
//             return this;
//         }
// 
//         public Builder setIncludeHeaders(boolean includeHeaders) {
//             this.includeHeaders = includeHeaders;
//             return this;
//         }
// 
//         public CsvSettings build() {
//             return new CsvSettings(includeHeaders, delimiter);
//         }
//     }
// 
// }


// Path: src/test/java/au/com/anthonybruno/annotated/GeneratorAnnotationTest.java
import au.com.anthonybruno.Gen;
import au.com.anthonybruno.settings.CsvSettings;
import com.univocity.parsers.csv.CsvParser;
import com.univocity.parsers.csv.CsvParserSettings;
import org.junit.Test;
import java.io.StringReader;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import static junit.framework.TestCase.assertFalse;
import static org.junit.Assert.*;

package au.com.anthonybruno.annotated;




public class GeneratorAnnotationTest {

    public static final int minAge = 18;
    public static final int maxAge = 80;


    @Test
    public void notEmpty() {
        String result = generateAnnotatedPersonCsv();
        assertFalse(result.isEmpty());
    }

    @Test
    public void correctHeaders() {
        String[] firstRow = generateAnnotatedPersonCsv().split("\n")[0].split(",");