LocalDateTimeConverter implements PropertyConverter<LocalDateTime> { @Override public int hashCode(){ return getClass().hashCode(); }  @Override LocalDateTime convert(String value, ConversionContext ctx); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void equalsAndHashcode() throws Exception { LocalDateTimeConverter conv1 = new LocalDateTimeConverter(); LocalDateTimeConverter conv2 = new LocalDateTimeConverter(); assertThat(conv2).isEqualTo(conv1); assertThat(conv2.hashCode()).isEqualTo(conv1.hashCode()); assertThat(conv2).isNotEqualTo(new LocalTimeConverter()); assertThat(conv2).isNotEqualTo(null); }
@Test public void testHashCode() { LocalDateTimeConverter instance = new LocalDateTimeConverter(); assertThat(instance.hashCode()).isEqualTo(LocalDateTimeConverter.class.hashCode()); }