Added test for templates function and const casting