diff --git a/src/test/java/com/fasterxml/jackson/dataformat/csv/ser/HeaderWriteTest.java b/src/test/java/com/fasterxml/jackson/dataformat/csv/ser/HeaderWriteTest.java index 87862fc..845811c 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/csv/ser/HeaderWriteTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/csv/ser/HeaderWriteTest.java @@ -22,19 +22,19 @@ public class HeaderWriteTest extends ModuleTestBase public void testNoLines() throws Exception { List headers = Arrays.asList("TestHeader1", "TestHeader2"); - List> dataSource = Arrays.asList(); - String result = runTest(headers, dataSource); - - assertEquals("Headers should have been written even with no other data", "TestHeader1,TestHeader2\n", result); + List> dataSource = Arrays.asList(); + String result = runTest(headers, dataSource); + + assertEquals("Headers should have been written even with no other data", "TestHeader1,TestHeader2\n", result); } public void testOneLine() throws Exception { List headers = Arrays.asList("TestHeader1", "TestHeader2"); - List> dataSource = Arrays.asList(Arrays.asList("TestValue1", "TestValue2")); - String result = runTest(headers, dataSource); - - assertEquals("Headers should have been written before line", "TestHeader1,TestHeader2\nTestValue1,TestValue2\n", result); + List> dataSource = Arrays.asList(Arrays.asList("TestValue1", "TestValue2")); + String result = runTest(headers, dataSource); + + assertEquals("Headers should have been written before line", "TestHeader1,TestHeader2\nTestValue1,TestValue2\n", result); } private String runTest(List headers, List> dataSource) throws IOException @@ -48,14 +48,14 @@ private String runTest(List headers, List> dataSource) thro CsvSchema schema = builder.setUseHeader(true).build(); try (SequenceWriter csvWriter = MAPPER.writerWithDefaultPrettyPrinter() - .with(schema) - .forType(List.class) - .writeValues(writer);) { + .with(schema) + .forType(List.class) + .writeValues(writer);) { for(List nextRow : dataSource) { - csvWriter.write(nextRow); + csvWriter.write(nextRow); } } - return writer.toString(); + return writer.toString(); } }