refactor tests with matchers