Added CodeGenerator tests