DDMFormInstanceRecordCSVWriter implements DDMFormInstanceRecordWriter { protected String writeRecords( List<Map<String, String>> ddmFormFieldValues) { Stream<Map<String, String>> stream = ddmFormFieldValues.stream(); return stream.map( Map::values ).map( this::writeValues ).collect( Collectors.joining(StringPool.NEW_LINE) ); }  @Override DDMFormInstanceRecordWriterResponse write(
			DDMFormInstanceRecordWriterRequest
				ddmFormInstanceRecordWriterRequest);  }
@Test public void testWriteRecords() { DDMFormInstanceRecordCSVWriter ddmFormInstanceRecordCSVWriter = new DDMFormInstanceRecordCSVWriter(); List<Map<String, String>> ddmFormFieldValues = new ArrayList<Map<String, String>>() { { add( LinkedHashMapBuilder.put( "field1", "value1" ).put( "field2", "false" ).put( "field3", "134.5" ).build()); add( LinkedHashMapBuilder.put( "field1", "" ).put( "field2", "true" ).put( "field3", "45" ).build()); } }; StringBundler sb = new StringBundler(2); sb.append("value1,false,134.5\n"); sb.append(",true,45"); String actual = ddmFormInstanceRecordCSVWriter.writeRecords( ddmFormFieldValues); Assert.assertEquals(sb.toString(), actual); }