added some tests to validator class