Added a test case on generator_test.go.