Added test coverage for function definition