Add a test for the validation

Add a test to ensure the validation works.