use of com.hazelcast.map.MapEvent in project hazelcast by hazelcast.
the class MapEventConstructorTest method testConstructor.
@Test
public void testConstructor() {
String source = UuidUtil.newUnsecureUuidString();
Member member = mock(Member.class);
int eventType = EntryEventType.INVALIDATION.getType();
MapEvent mapEvent = new MapEvent(source, member, eventType, 23);
MapEventConstructor constructor = new MapEventConstructor(MapEvent.class);
MapEvent clonedMapEvent = (MapEvent) constructor.createNew(mapEvent);
assertEquals(mapEvent.getName(), clonedMapEvent.getName());
assertEquals(mapEvent.getMember(), clonedMapEvent.getMember());
assertEquals(mapEvent.getEventType(), clonedMapEvent.getEventType());
assertEquals(mapEvent.getSource(), clonedMapEvent.getSource());
assertEquals(mapEvent.getNumberOfEntriesAffected(), clonedMapEvent.getNumberOfEntriesAffected());
}
Aggregations