Add tests for template