def METHOD_NAME(self):
    entries = [
        "1a-2f@foo=bar1",
        "1a-_*/2b@foo=bar2",
        "foo=bar3",
        "foo-_*/bar=bar4",
    ]
    header_list = [",".join(entries)]
    state = TraceState.from_header(header_list)
    new_state = state.update("foo", "bar33")
    entries = list(new_state.items())  # type: ignore
    foo_place = entries.index(("foo", "bar33"))  # type: ignore
    prev_first_place = entries.index(("1a-2f@foo", "bar1"))  # type: ignore
    self.assertLessEqual(foo_place, prev_first_place)