Added test cases for exceptions thrown by producer functions
Removed unused import