### Question:
CSVHelper { public String listToCSVString(final List<String> list) { final StringBuilder sb = new StringBuilder(); if (list == null) { return sb.toString(); } for(int i = 0; i < list.size(); i++) { sb.append(list.get(i)); if (i != list.size() - 1) { sb.append(","); } } return sb.toString(); }  List<String> csvStringToList(final String csv, final boolean lowerCase); String listToCSVString(final List<String> list);  }### Answer:
@Test public void shouldReturnEmptyStringFromNullList() { List<String> myList = null; String result = csvHelper.listToCSVString(myList); assertNotNull(result); assertEquals(result, ""); }
@Test public void shouldReturnEmptyStringFromEmptyList() { List<String> myList = new ArrayList<String>(); String result = csvHelper.listToCSVString(myList); assertNotNull(result); assertEquals(result, ""); }
@Test public void shouldReturnCommaSeperatedListInString() { List<String> myList = new ArrayList<String>(); myList.add("one"); myList.add("two"); String result = csvHelper.listToCSVString(myList); assertNotNull(result); assertEquals(result, "one,two"); }