I'd just add ` && key == value` in the `if`because now we're setting expected value unconditionally which is cheating.