refine generator test cases