GregorianCalendar future = new GregorianCalendar();
future.set(Calendar.YEAR, 3000);//will people still be using Java then... or computers? :)
p.set("dob", new Date(future.getTimeInMillis()));
p.validate();
a(p.errors().size()).shouldBeEqual(3);
a(p.errors().get("invalid.dob")).shouldBeEqual("date of birth cannot be in future");
//this is so that other tests succeed
Person.removeValidator(validator);