### Question:
ClassBasedModelDefinition implements ModelDefinition<T> { @Override public int hashCode() { return c.hashCode(); } ClassBasedModelDefinition(Class<T> c); @Nonnull @Override ResourceModel getResourceModel(); @Nonnull @Override String getName(); @Nonnull @Override Class<T> getType(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testHashCodeAnEquals() { ClassBasedModelDefinition<Model> one = new ClassBasedModelDefinition<>(Model.class); ClassBasedModelDefinition<Model> sameOne = new ClassBasedModelDefinition<>(Model.class); ClassBasedModelDefinition<OtherModel> two = new ClassBasedModelDefinition<>(OtherModel.class); assertThat(one).isEqualTo(sameOne); assertThat(sameOne).isEqualTo(one); assertThat(one.hashCode()).isEqualTo(sameOne.hashCode()); assertThat(one).isEqualTo(one); assertThat(one).isEqualTo(one); assertThat(one.hashCode()).isEqualTo(one.hashCode()); assertThat(one).isNotEqualTo(two); assertThat(two).isNotEqualTo(one); assertThat(one.hashCode()).isNotEqualTo(two.hashCode()); }