def test_idx_and_len_list_same():
    list = LinkedList(['2018', '2019', '2020'])
    list.get_at_end_index(2)
def test_idx_out_of_range():
    with pytest.raises(Exception):
        list = LinkedList(['2018', '2019'])
        list.get_at_end_index(2)
def test_list_with_one_el():
    list = LinkedList(['2020'])
    list.get_at_end_index(0)
def test_middle_idx():
    list = LinkedList(['2016', '2017', '2018', '2020', '2021'])
    list.get_at_end_index(2)
def test_idx_negative():
    with pytest.raises(Exception):
        list = LinkedList(['2018', '2019', '2020'])
        list.get_at_end_index(-1)