Factored out redundant test setup