test infrastructure refactoring