Simplifying a test setup code