minor refactoring of tests