improve test helper modularization