@Test public void operationIsSymetric() { final LocalDateTime originalDate = LocalDateTime.of(2014, 1, 1, 17, 10, 23); final Java8LocalDateTimeConverter converter = new Java8LocalDateTimeConverter(); final Object serialized = converter.toDbValue(originalDate); final Object unserialized = converter.fromDbValue(serialized); assertThat(unserialized).isEqualTo(originalDate); }
@Override public Object toDbValue(Object value) { return Date.from(((LocalDateTime) value).atZone(ZoneId.systemDefault()).toInstant()); }
Java8LocalDateTimeConverter extends Converter { @Override public Object toDbValue(Object value) { return Date.from(((LocalDateTime) value).atZone(ZoneId.systemDefault()).toInstant()); } }
Java8LocalDateTimeConverter extends Converter { @Override public Object toDbValue(Object value) { return Date.from(((LocalDateTime) value).atZone(ZoneId.systemDefault()).toInstant()); }  }
Java8LocalDateTimeConverter extends Converter { @Override public Object toDbValue(Object value) { return Date.from(((LocalDateTime) value).atZone(ZoneId.systemDefault()).toInstant()); }  @Override Object toDbValue(Object value); }
Java8LocalDateTimeConverter extends Converter { @Override public Object toDbValue(Object value) { return Date.from(((LocalDateTime) value).atZone(ZoneId.systemDefault()).toInstant()); }  @Override Object toDbValue(Object value);  }