### Question:
CommonFormat { public static String rowToString(List<String> row) { StringBuilder sb = new StringBuilder(); for (String s : row) { addToStringBuilder(sb, s); } return sb.toString(); } CommonFormat(ColumnMeta columnMeta);  CommonFormat(ColumnMeta columnMeta, char sourceDecimalSeparator, char sourceGroupingSeparator); ReportLine toCommonFormat(List<String> sourceRow); static String rowToString(List<String> row); static String rowToString(ReportLine row); double parseDouble(String columnName, String value); static String doubleToString(double value); ReportLine toReportLine(List<String> row); static void printRow(String[] row); static void printRow(List<String> row); static final char FIELD_SEPARATOR; static final char FIELD_DELIMITER; static final char ESCAPE_CHAR; static final char DECIMAL_SEPARATOR_DEFAULT; static final char DECIMAL_GROUPING_SEPARATOR_DEFAULT; }### Answer:
@Test public void rowToString() throws ParseException { final List<String> values = Lists.newArrayList("val\"ue1", "\"val,;ue2\"", "value3", "value4"); String line = CommonFormat.rowToString(values); assertEquals("\"val\\\"ue1\",\"\\\"val,;ue2\\\"\",\"value3\",\"value4\"", line); final ReportLine r = new ReportLine(); r.setDlabId("accountId"); r.setUser("user"); r.setUsageDate("2016-03-20"); r.setProduct("Amazon Elastic Compute Cloud"); r.setUsageType("usageType"); r.setUsage(56.7); r.setCost(1234.56789); r.setCurrencyCode("USD"); r.setResourceTypeId("i-1234567890abcdefg"); r.setTags(Maps.newLinkedHashMap(BillingUtils.stringsToMap("tag1", "value1", "tag2", "value2"))); line = CommonFormat.rowToString(r); assertEquals("\"accountId\",\"user\",\"2016-03-20\",\"Amazon Elastic Compute Cloud\"," + "\"usageType\",\"56.7\",\"1234.56789\",\"USD\"," + "\"COMPUTER\",\"i-1234567890abcdefg\"," + "\"value1\",\"value2\"", line); }