Add and test basic PatternMatching functionality.