Add tests for error messages.