@@ -0,0 +1,1715 @@
+package com.airhacks.enhydrator.out;%0A%0Aimport com.airhacks.enhydrator.in.CSVFileSource;%0Aimport com.airhacks.enhydrator.in.Row;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertTrue;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0A/**%0A *%0A * @author airhacks.com%0A */%0Apublic class CSVFileSinkTest %7B%0A%0A    static final String FILE_NAME = %22./target/temp%22 + System.currentTimeMillis() + %22.csv%22;%0A    private static final String DELIMITER = %22%7C%22;%0A    private final boolean USE_HEADERS = true;%0A    private CSVFileSink cut;%0A%0A    @Before%0A    public void init() %7B%0A        this.cut = new CSVFileSink(FILE_NAME, DELIMITER, USE_HEADERS, false);%0A    %7D%0A%0A    @Test%0A    public void serializeLineWithHeaders() %7B%0A        cut.init();%0A        final Row entries = getEntries();%0A        cut.processRow(entries);%0A        cut.close();%0A%0A        CSVFileSource source = new CSVFileSource(FILE_NAME, DELIMITER, %22utf-8%22, USE_HEADERS);%0A        Iterable%3CRow%3E result = source.query(null, null);%0A        Row read = result.iterator().next();%0A        assertNotNull(read);%0A        System.out.println(entries.getColumnNames() + %22 %22 + read.getColumnNames());%0A        read.getColumnNames().stream().forEach(t%0A                -%3E assertTrue(entries.getColumnNames().contains(t)));%0A        Row content = result.iterator().next();%0A        assertNotNull(content);%0A    %7D%0A%0A    @Test%0A    public void serializeLineWithoutHeaders() %7B%0A        CSVFileSink cut = new CSVFileSink(FILE_NAME, %22%7C%22, false, false);%0A        cut.init();%0A        cut.processRow(getEntries());%0A    %7D%0A%0A    Row getEntries() %7B%0A        Row row = new Row();%0A        row.addColumn(-1, %22a%22, %22java%22);%0A        row.addColumn(-1, %22b%22, %22tengah%22);%0A        return row;%0A    %7D%0A%0A%7D%0A

Test implemented