Fix structure of test.c where we call code before/after a collection runs.