You should do this before asserting the values of the entries.  Otherwise, dereferencing list->next->next shall segfault the test when the list's length is, due to some bug someone introduces some day, less than three.  The test should report the wrong length rather than segfaulting.