Added test for function pattern