Add tests for helper validation function