added test to ensure error message working