Completely rewrite match(es) API test cases