Refactored validation test