refactoring test validates