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