def METHOD_NAME(
    agent_heartbeat_handler, in_memory_agent_repository, mock_island_event_queue
):
    in_memory_agent_repository.upsert_agent(AGENT_ALREADY_STOPPED)
    expected_stop_time = AGENT_ALREADY_STOPPED.stop_time
    heartbeat_time = AGENT_ALREADY_STOPPED.stop_time + timedelta(seconds=1000)
    agent_heartbeat_handler.handle_agent_heartbeat(
        AGENT_ID_ALREADY_STOPPED, AgentHeartbeat(timestamp=heartbeat_time)
    )
    agent_heartbeat_handler.set_unresponsive_agents_stop_time()
    assert (
        in_memory_agent_repository.get_agent_by_id(AGENT_ID_ALREADY_STOPPED).stop_time
        == expected_stop_time
    )
    assert not mock_island_event_queue.publish.called