@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);
}