Changes to unit tests for pretest and posttest