tests exceptions