Add spec for class validation.