Merge "Test coverage and refactor for GeneratorUtil"