add template message test and some method in Variable.