### Question:
ELConstantsFunctions { public static String appendAll(String src, String append, String delimeter) { if (src != null && delimeter != null) { if (append == null) { append = ""; } String[] ret = src.split(delimeter); StringBuilder result = new StringBuilder(); for (int i = 0; i < ret.length; i++) { result.append(ret[i]).append(append); if (i < (ret.length - 1)) { result.append(delimeter); } } if (src.startsWith(delimeter) && ret.length > 0 && !ret[0].equals("")) { result.insert(0, append); } return result.toString(); } return src; }  static Object firstNotNull(Object o1, Object o2); static String concat(String s1, String s2); static String replaceAll(String src, String regex, String replacement); static String appendAll(String src, String append, String delimeter); static String trim(String input); static String timestamp(); static String urlEncode(String input); static String toJsonStr(Map<String, String> map); static String toPropertiesStr(Map<String, String> map); static String toConfigurationStr(Map<String, String> map); static final long KB; static final long MB; static final long GB; static final long TB; static final long PB; static final int SUBMIT_MINUTES; static final int SUBMIT_HOURS; static final int SUBMIT_DAYS; }### Answer:
@Test public void testAppendAll() { assertEquals("/a/b/ADD,/c/b/ADD,/c/d/ADD", ELConstantsFunctions.appendAll("/a/b/,/c/b/,/c/d/", "ADD", ",")); assertEquals("/a/b/ADD", ELConstantsFunctions.appendAll("/a/b/", "ADD", ",")); assertEquals(" /a/b/ ADD,/c/b/ ADD, /c/d/ ADD", ELConstantsFunctions.appendAll(" /a/b/ ,/c/b/ , /c/d/ ", "ADD", ",")); assertEquals("/a/b/ADD", ELConstantsFunctions.appendAll("/a/b/", "ADD", ",")); assertEquals(null, ELConstantsFunctions.appendAll(null, "ADD", ",")); assertEquals("/a/b/,/c/b/,/c/d/", ELConstantsFunctions.appendAll("/a/b/,/c/b/,/c/d/", null, ",")); assertEquals("/a/b/,/c/b/,/c/d/", ELConstantsFunctions.appendAll("/a/b/,/c/b/,/c/d/", "ADD", null)); assertEquals("ADDaADDbADD", ELConstantsFunctions.appendAll("ab", "ADD", "")); assertEquals("/a/b/ADD,/c/b/ADD,/c/d/ADD", ELConstantsFunctions.appendAll("/a/b/,/c/b/,/c/d/", "ADD", ",")); }