extracting method assert_matches_partial