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