### Question:
StringUtils { public static String formatException(Throwable th) { return "[" + th.getClass().getSimpleName() + "]: " + th.getMessage(); } private  StringUtils(); static double getDifference(String first, String second); static boolean containsAny(String str, Iterable<String> pieces); static boolean isEmpty(String str); static String formatException(Throwable th); static boolean isInsideString(char needle, String haystack);  }### Answer:
@Test public void shouldFormatException() { MalformedURLException ex = new MalformedURLException("Unrecognized URL format"); String result = StringUtils.formatException(ex); assertThat(result, equalTo("[MalformedURLException]: Unrecognized URL format")); }