Added test case that requires head tail pattern matching