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