valueAsDate is nullable:
  attribute Date? valueAsDate;
so, this test isn't really working...