PATTERN TESTING