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