Refactored (extracted method) checkThatHashesMatching()