added test for generator