### Question:
StringUtils { public static String[] split(String str) { return split(str, ESCAPE_CHAR, COMMA); }  static String stringifyException(Throwable e); static String simpleHostname(String fullHostname); @Deprecated static String humanReadableInt(long number); static String format(final String format, final Object... objects); static String formatPercent(double fraction, int decimalPlaces); static String arrayToString(String[] strs); static String byteToHexString(byte[] bytes, int start, int end); static String byteToHexString(byte bytes[]); static byte[] hexStringToByte(String hex); static String uriToString(URI[] uris); static URI[] stringToURI(String[] str); static Path[] stringToPath(String[] str); static String formatTimeDiff(long finishTime, long startTime); static String formatTime(long timeDiff); static String getFormattedTimeWithDiff(DateFormat dateFormat, 
                                                long finishTime, long startTime); static String[] getStrings(String str); static Collection<String> getStringCollection(String str); static Collection<String> getTrimmedStringCollection(String str); static String[] getTrimmedStrings(String str); static String[] split(String str); static String[] split(
      String str, char escapeChar, char separator); static String[] split(
      String str, char separator); static int findNext(String str, char separator, char escapeChar, 
                             int start, StringBuilder split); static String escapeString(String str); static String escapeString(
      String str, char escapeChar, char charToEscape); static String escapeString(String str, char escapeChar, 
                                    char[] charsToEscape); static String unEscapeString(String str); static String unEscapeString(
      String str, char escapeChar, char charToEscape); static String unEscapeString(String str, char escapeChar, 
                                      char[] charsToEscape); static void startupShutdownMessage(Class<?> clazz, String[] args,
                                     final org.apache.commons.logging.Log LOG); static String escapeHTML(String string); static String byteDesc(long len); @Deprecated static String limitDecimalTo2(double d); static String join(CharSequence separator, Iterable<?> strings); static String camelize(String s); static final int SHUTDOWN_HOOK_PRIORITY; final static String[] emptyStringArray; final static char COMMA; final static String COMMA_STR; final static char ESCAPE_CHAR; }### Answer:
@Test public void testSplit() throws Exception { assertEquals(NULL_STR, StringUtils.split(NULL_STR)); String[] splits = StringUtils.split(EMPTY_STR); assertEquals(0, splits.length); splits = StringUtils.split(",,"); assertEquals(0, splits.length); splits = StringUtils.split(STR_WO_SPECIAL_CHARS); assertEquals(1, splits.length); assertEquals(STR_WO_SPECIAL_CHARS, splits[0]); splits = StringUtils.split(STR_WITH_COMMA); assertEquals(2, splits.length); assertEquals("A", splits[0]); assertEquals("B", splits[1]); splits = StringUtils.split(ESCAPED_STR_WITH_COMMA); assertEquals(1, splits.length); assertEquals(ESCAPED_STR_WITH_COMMA, splits[0]); splits = StringUtils.split(STR_WITH_ESCAPE); assertEquals(1, splits.length); assertEquals(STR_WITH_ESCAPE, splits[0]); splits = StringUtils.split(STR_WITH_BOTH2); assertEquals(3, splits.length); assertEquals(EMPTY_STR, splits[0]); assertEquals("A\\,", splits[1]); assertEquals("B\\\\", splits[2]); splits = StringUtils.split(ESCAPED_STR_WITH_BOTH2); assertEquals(1, splits.length); assertEquals(ESCAPED_STR_WITH_BOTH2, splits[0]); }
@Test public void testSimpleSplit() throws Exception { final String[] TO_TEST = { "a/b/c", "a/b/c " "", "/", " for (String testSubject : TO_TEST) { assertArrayEquals("Testing '" + testSubject + "'", testSubject.split("/"), StringUtils.split(testSubject, '/')); } }