Replace complex test with custom matcher.