Validation for cert and test for it