Adds functional test for validate().