def METHOD_NAME(song, song3, tmp_path, mocker):
    mocker.patch('feeluown.collection.resolve', return_value=song)
    f = tmp_path / 'test.fuo'
    f.touch()
    first_line = 'fuo://fake/songs/0\n'  # song
    remain_lines = 'fuo://fake/songs/1\n' + 'fuo://fake/songs/2\n'
    text = first_line + remain_lines
    f.write_text(text)
    coll = Collection(str(f))
    coll.load()
    assert coll.name == 'test'  # name should be filename
    coll.remove(song)
    # 1. the first line should be removed
    # 2. no metadata should be written
    assert f.read_text() == remain_lines
    coll.add(song3)
    lines = f.read_text().split('\n')
    assert len(lines) == 4  # three plus two empty
    assert lines[0].startswith('fuo://fake/songs/3')