spec test for template function.