def test_add_job_replace(self, scheduler):
        scheduler.start(paused=True)
        scheduler.add_job(lambda: None, 'interval', id='testjob', seconds=1)
        scheduler.add_job(lambda: None, 'cron', id='testjob', name='replacement',
                          replace_existing=True)
        jobs = scheduler.get_jobs()
        assert len(jobs) == 1
        assert jobs[0].name == 'replacement'
Test that with replace_existing=True, a new job replaces another with the same id.
dataset/ETHPy150Open agronholm/apscheduler/tests/test_schedulers.py/TestBaseScheduler.test_add_job_replace