Add more complicated pattern matching test case