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