test cases for generator