Slightly refactor test setup.