added tests for error messages