### Question:
StringUtilities { public static <T> String DelimitStringAndWrapEntriesWithQuotes(Collection<T> objects, String delim) { String newString = ""; for (Object string : objects) { newString += "'" + string.toString() + "'" + delim; } if (!newString.equals("")) { newString = newString.substring(0, newString.length() - delim.length()); } return newString; }  static String DelimitString(Collection<T> objects, String delim); static String DelimitStringAndWrapEntriesWithQuotes(Collection<T> objects, String delim); static String buildDelemtedListFromStringArray(String[] a, String separator); static String buildDelemtedListFromIntegerArray(Integer[] a, String separator);  }### Answer:
@Test public void testDelimitStringAndWrapEntriesWithQuotes() { ArrayList<String> testList = new ArrayList<String>(); testList.add("1234"); testList.add("12345"); testList.add("123456"); testList.add("1234567"); String delimitedString = StringUtilities.DelimitStringAndWrapEntriesWithQuotes(testList, ", "); assertEquals("'1234', '12345', '123456', '1234567'", delimitedString); }
@Test public void testDelimitStringAndWrapEntriesWithQuotesWithEmptyList() { ArrayList<String> testList = new ArrayList<String>(); String delimitedString = StringUtilities.DelimitStringAndWrapEntriesWithQuotes(testList, ", "); assertEquals("", delimitedString); }