"""Test that when the length of mapped literal increases, additional ti is added"""
    with dag_maker(session=session) as dag:
        @task
        def task_2(arg2):
            ...
        task_2.expand(arg2=[1, 2, 3, 4])
    dr = dag_maker.create_dagrun()
    tis = dr.get_task_instances()
    indices = [(ti.map_index, ti.state) for ti in tis]
    assert sorted(indices) == [
        (0, State.NONE),
        (1, State.NONE),
        (2, State.NONE),
        (3, State.NONE),
    ]
    
    dag._remove_task("task_2")
    with dag:
        task_2.expand(arg2=[1, 2, 3, 4, 5]).operator
    
    
    serialized_dag = SerializedDAG.from_dict(SerializedDAG.to_dict(dag))
    dr.dag = serialized_dag
    
    dr.task_instance_scheduling_decisions()
    tis = dr.get_task_instances()
    indices = [(ti.map_index, ti.state) for ti in tis]