Tests exceptions