Add tests for the new, more descriptive error messages