wrote tests for validation class