Write unit tests for Parse() and MatchesPattern()