use of com.hazelcast.internal.serialization.SerializationServiceBuilder in project hazelcast by hazelcast.
the class SetEqualsHashTest method testCollectionItem_equalsAndHash.
@Test
public void testCollectionItem_equalsAndHash() {
SerializationServiceBuilder serializationServiceBuilder = new DefaultSerializationServiceBuilder();
SerializationService build = serializationServiceBuilder.build();
Data value = build.toData(randomString());
CollectionItem firstItem = new CollectionItem(1, value);
CollectionItem secondItem = new CollectionItem(2, value);
assertTrue(firstItem.equals(secondItem));
assertEquals(firstItem.hashCode(), secondItem.hashCode());
}
Aggregations