### Question:
DefaultExceptionFormatter implements ExceptionFormatter { public String format(Throwable th) { if (th == null) { throw new IllegalArgumentException("format: th cannot be null"); } StringBuilder result = new StringBuilder(); String postError = ""; Throwable cause = th; if (th instanceof SQLExecutionException) { postError = ((SQLExecutionException)th).getPostError(); cause = th.getCause(); } String customMessage = null; if (customFormatter != null && customFormatter.formatsException(cause)) { try { customMessage = customFormatter.format(cause); } catch (Exception e) { s_log.error( "Exception occurred while formatting: "+e.getMessage(), e); } } if (customMessage != null) { result.append(customMessage); } else { result.append(defaultFormatSQLException(cause)); } if (postError != null && !"".equals(postError)) { result.append("\n"); result.append(postError); } return result.toString(); }  String format(Throwable th); String defaultFormatSQLException(Throwable cause); boolean formatsException(Throwable t); void setCustomExceptionFormatter(ExceptionFormatter customFormatter);  }### Answer:
@Test (expected = IllegalArgumentException.class) public final void testNullThrowableFormat() { formatterUnderTest.format(null); }