Added complete decoration. Fix a bug in TestGen