add test case for functional template