### Question:
SqlDataSourceUtils { public static void logSqlException(SQLException e) { ConsoleLogger.logException("Error during SQL operation:", e); } private  SqlDataSourceUtils(); static void logSqlException(SQLException e); static Long getNullableLong(ResultSet rs, String columnName); static boolean isNotNullColumn(DatabaseMetaData metaData, String tableName,
                                          String columnName); static Object getColumnDefaultValue(DatabaseMetaData metaData, String tableName,
                                               String columnName);  }### Answer:
@Test public void shouldLogException() { String msg = "Hocus pocus did not work"; SQLException ex = new SQLException(msg); SqlDataSourceUtils.logSqlException(ex); verify(logger).warning(argThat(containsString(msg))); }