Test error codes in tests for malformed root objects