Test error conditions