def METHOD_NAME(self, warn_logger):
    optimizer = self.get_optimizer()
    self.mock_popen.return_value.returncode = 1
    self.mock_popen.return_value.communicate.return_value = (
        "Output",
        "Error",
    )
    optimizer.run_optimizer(".jpg", "garbage")
    warn_logger.assert_called_once()