### Question:
Utils { public static String concat(CharSequence... strings) { if (strings.length == 0) { return ""; } if (strings.length == 1) { return strings[0].toString(); } int length = 0; int indexOfSingleNonEmptyString = -1; for (int i = 0; i < strings.length; i++) { CharSequence charSequence = strings[i]; int len = charSequence.length(); length += len; if (indexOfSingleNonEmptyString != -2 && len > 0) { if (indexOfSingleNonEmptyString == -1) { indexOfSingleNonEmptyString = i; } else { indexOfSingleNonEmptyString = -2; } } } if (length == 0) { return ""; } if (indexOfSingleNonEmptyString > 0) { return strings[indexOfSingleNonEmptyString].toString(); } StringBuilder sb = new StringBuilder(length); for (CharSequence charSequence : strings) { sb.append(charSequence); } return sb.toString(); } private  Utils(); static String join(String delimiter, String wrap, Iterable<?> objs); static String join(String delimiter, Iterable<?> objs); static String concat(CharSequence... strings); static void closeQuietly(Closeable closeable); static String escape(String str, boolean escapeSingleQuote); static String unescape(String str); static String hex(char ch); static boolean isEmpty(CharSequence cs); static T notNull(T object, String message, Object... values); static void isTrue(boolean expression, String message); static void onlyOneIsTrue(final String message, final boolean... expressions); static boolean onlyOneIsTrueNonThrow(final boolean... expressions); static T notEmpty(T chars, String message, Object... values); static String toString(Object o);  }### Answer:
@Test public void testConcat() { Assert.assertEquals("", Utils.concat()); Assert.assertEquals("", Utils.concat("")); Assert.assertEquals("", Utils.concat("", "")); Assert.assertEquals("a", Utils.concat("a")); Assert.assertEquals("a", Utils.concat("", "a", "")); Assert.assertEquals("abc", Utils.concat("a", "b", "c")); }