@Test public void operationIsSymetric() { final LocalDate originalDate = LocalDate.of(2014, 1, 1); final Java8LocalDateConverter converter = new Java8LocalDateConverter(); 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(((LocalDate) value).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); }
Java8LocalDateConverter extends Converter { @Override public Object toDbValue(Object value) { return Date.from(((LocalDate) value).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); } }
Java8LocalDateConverter extends Converter { @Override public Object toDbValue(Object value) { return Date.from(((LocalDate) value).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); }  }
Java8LocalDateConverter extends Converter { @Override public Object toDbValue(Object value) { return Date.from(((LocalDate) value).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); }  @Override Object toDbValue(Object value); }
Java8LocalDateConverter extends Converter { @Override public Object toDbValue(Object value) { return Date.from(((LocalDate) value).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); }  @Override Object toDbValue(Object value);  }