Add test for error