Added tests for error messages