minor tests refactoring