@@ -0,0 +1,1670 @@
+package io.mandrel.data.export;%0A%0Aimport io.mandrel.data.content.FieldExtractor;%0Aimport io.mandrel.gateway.Document;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.OutputStreamWriter;%0Aimport java.io.Writer;%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport org.assertj.core.api.Assertions;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class DelimiterSeparatedValuesExporterTest %7B%0A%0A%09@Test%0A%09public void export_documents_default() throws Exception %7B%0A%0A%09%09// Arrange%0A%09%09DelimiterSeparatedValuesExporter exporter = new DelimiterSeparatedValuesExporter();%0A%0A%09%09ByteArrayOutputStream out = new ByteArrayOutputStream();%0A%09%09Writer writer = new OutputStreamWriter(out);%0A%0A%09%09List%3CDocument%3E documents = new ArrayList%3C%3E();%0A%0A%09%09Document document1 = new Document();%0A%09%09document1.put(%22key1%22, Arrays.asList(%22value1%22));%0A%09%09document1.put(%22key2%22, Arrays.asList(%22value2%22, %22value2b%22));%0A%09%09documents.add(document1);%0A%0A%09%09Document document2 = new Document();%0A%09%09document2.put(%22key1%22, Arrays.asList(%22value11111%22));%0A%09%09document2.put(%22key2%22, Arrays.asList(%22value22222%22, %22value22222b%22));%0A%09%09documents.add(document2);%0A%0A%09%09List%3CFieldExtractor%3E fields = new ArrayList%3C%3E();%0A%09%09fields.add(new FieldExtractor().setName(%22key1%22));%0A%09%09fields.add(new FieldExtractor().setName(%22key2%22));%0A%0A%09%09// Actions%0A%09%09exporter.init(writer);%0A%09%09exporter.export(documents, fields);%0A%09%09exporter.close();%0A%0A%09%09// Asserts%0A%09%09String result = new String(out.toByteArray());%0A%09%09Assertions.assertThat(result).contains(%22key1,key2%22).contains(%22value1,value2%7Cvalue2b%22).contains(%22value11111,value22222%7Cvalue22222b%22);%0A%09%7D%0A%7D%0A

Add tests for csv exporter