LocalDateTimeConverter implements AttributeConverter<LocalDateTime, Timestamp> { @Override public LocalDateTime convertToEntityAttribute(Timestamp dbData) { if (null == dbData) { return null; } return LocalDateTime.from(dbData.toInstant()); }  @Override Timestamp convertToDatabaseColumn(LocalDateTime localDateTime); @Override LocalDateTime convertToEntityAttribute(Timestamp dbData);  }
@Test public void null_values_are_read_as_nulls() { assertNull(new LocalDateTimeConverter().convertToEntityAttribute(null)); }