Rewrite with mock_guard