Move common test setup to test helper