validation tests refactoring