Adding test for improved error messaging.