### Question:
StringUtils { public static URI[] stringToURI(String[] str){ if (str == null) return null; URI[] uris = new URI[str.length]; for (int i = 0; i < str.length;i++){ try{ uris[i] = new URI(str[i]); }catch(URISyntaxException ur){ throw new IllegalArgumentException( "Failed to create uri for " + str[i], ur); } } return uris; }  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> getStringCollection(String str, String delim); static Collection<String> getTrimmedStringCollection(String str); static String[] getTrimmedStrings(String str); static Set<String> getTrimmedStrings(Collection<String> strings); 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 void startupShutdownMessage(Class<?> clazz, String[] args,
                                     final org.slf4j.Logger 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 join(char separator, Iterable<?> strings); static String join(CharSequence separator, String[] strings); static String join(char separator, String[] strings); static String camelize(String s); static String replaceTokens(String template, Pattern pattern,
      Map<String, String> replacements); static String getStackTrace(Thread t); static String popOptionWithArgument(String name, List<String> args); static boolean popOption(String name, List<String> args); static String popFirstNonOption(List<String> args); static String toLowerCase(String str); static String toUpperCase(String str); static boolean equalsIgnoreCase(String s1, String s2); static final int SHUTDOWN_HOOK_PRIORITY; static final Pattern SHELL_ENV_VAR_PATTERN; static final Pattern WIN_ENV_VAR_PATTERN; static final Pattern ENV_VAR_PATTERN; final static String[] emptyStringArray; final static char COMMA; final static String COMMA_STR; final static char ESCAPE_CHAR; }### Answer:
@Test (timeout = 30000) public void testStringToURI() { String[] str = new String[] { "file: try { StringUtils.stringToURI(str); fail("Ignoring URISyntaxException while creating URI from string file: } catch (IllegalArgumentException iae) { assertEquals("Failed to create uri for file: } }