Add more tests for generator