Added some more tests for error conditions.