Refactor tests to use matchers.