minor refactoring in test class