Fix test setup/teardown.