Small refactor in test fixture so it can be better reused