### Question:
B2StringUtil { public static String join(String delimiter, Object[] objects) { final StringBuilder builder = new StringBuilder(); for (Object o : objects) { if (builder.length() > 0) { builder.append(delimiter); } final String s = (o == null) ? null : o.toString(); builder.append(s); } return builder.toString(); } B2StringUtil(); static String percentEncode(String s); static String percentDecode(String s); static int decimalSubstringToInt(String s, int startIndex, int endIndex); static boolean decimalNumberInRange(String str, int offset, int length,
                                               int minInclusive, int maxInclusive); static String join(String delimiter, Object[] objects); static byte [] getUtf8Bytes(String str); static String toHexString(byte[] b); static String underscoresToCamelCase(String orig, boolean capitalizeFirstLetter); static boolean startsWithIgnoreCase(String all, String possiblePrefix); static final String UTF8; }### Answer:
@Test public void testJoin() { assertEquals("", join(",", new Object[0])); assertEquals("null", join(",", new Object[] {null})); assertEquals("null,null", join(",", new Object[] {null, null})); assertEquals("abc, 1, 2, 3", join(", ", new Object[] {"abc", 1, 2, 3})); }