Added test case for functions