### Question:
OsgiModelSource { @Override public int hashCode() { return this.hashCode; } OsgiModelSource(ModelDefinition<T> modelDefinition, ResourceModelFactory factory, Bundle bundle); T getModel(ContentToModelMappingCallback<T> callback); Class<?> getModelType(); long getBundleId(); ResourceModelFactory getFactory(); String getModelName(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); Bundle getBundle();  }### Answer:
@Test public void testHashCodeAndEquals() { OsgiModelSource<?> one = new OsgiModelSource<>(modelDefinition("one"), mock(ResourceModelFactory.class), this.bundleOne); OsgiModelSource<?> two = new OsgiModelSource<>(modelDefinition("one"), mock(ResourceModelFactory.class), this.bundleOne); assertThat(one.hashCode()).isEqualTo(two.hashCode()); assertThat(one).isEqualTo(two); assertThat(two).isEqualTo(one); one = new OsgiModelSource<>(modelDefinition("one"), mock(ResourceModelFactory.class), this.bundleOne); two = new OsgiModelSource<>(modelDefinition("two"), mock(ResourceModelFactory.class), this.bundleOne); assertThat(one.hashCode()).isNotEqualTo(two.hashCode()); assertThat(one).isNotEqualTo(two); assertThat(two).isNotEqualTo(one); one = new OsgiModelSource<>(modelDefinition("one"), mock(ResourceModelFactory.class), this.bundleOne); two = new OsgiModelSource<>(modelDefinition("one"), mock(ResourceModelFactory.class), this.bundleTwo); assertThat(one.hashCode()).isNotEqualTo(two.hashCode()); assertThat(one).isNotEqualTo(two); assertThat(two).isNotEqualTo(one); }