LocalDateConverter implements ConverterWrapper<LocalDate, Date> { @Override public LocalDate convertToAttribute(Date value) { return value != null ? value.toInstant().atZone(ZoneId.systemDefault()).toLocalDate() : null; }  @Override Date convertToAxiomValue(LocalDate value); @Override LocalDate convertToAttribute(Date value); @Override boolean supportsAxiomValueType(Class<?> type);  }
@Test void convertToAttributeTransformsJavaUtilDateToLocalDate() { final Date value = new Date(); final LocalDate result = sut.convertToAttribute(value); assertNotNull(result); assertEquals(value.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), result); }
@Test void convertToAttributeReturnsNullForNullInput() { assertNull(sut.convertToAttribute(null)); }