I don't understand how the date is parsed in this way and the final result is 1799.
...
@ExpectedDatabase(value = "/dataset/expected/gestionVehicule/doss.xml",
assertionMode = DatabaseAssertionMode.NON_STRICT_UNORDERED)
In the XML file, the comparing set:
<VEH_DATE_MEC="1800-01-01"/>
...
SimpleDateFormat isoFormat = new SimpleDateFormat("yyyy-MM-dd");
isoFormat.setTimeZone(TimeZone.getTimeZone("GMT+1"));
Date date = isoFormat.parse("1800-01-01");
vehiculeFrontDto.setDatePremiereImmat(date);
The setter:
public void setDatePremiereImmat(Date datePremiereImmat) {
this.datePremiereImmat = DateCopyUtils.copyDate(datePremiereImmat);
}
Date received with the debugger stored in the date variable: Tue Dec 31 23:00:00 UTC 1799
Test: expected:<1[800-01-01]> but was:<1[799-12-31 23:00:00.0]>