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