updated test that throws error