Add tests file for templates engine. #1558
Add unit tests for templates engine. #1558