writing validation tests