Update yeoman-generator and refactor test cases.