StreamEvent implements Serializable { public StreamEvent copy() { StreamEvent newEvent = new StreamEvent(); newEvent.setTimestamp(this.getTimestamp()); newEvent.setData(this.getData()); newEvent.setStreamId(this.getStreamId()); newEvent.setMetaVersion(this.getMetaVersion()); return newEvent; } StreamEvent();  StreamEvent(String streamId, long timestamp, Object[] data);  StreamEvent(String streamId, long timestamp, Object[] data, String metaVersion); String getStreamId(); void setStreamId(String streamId); void setData(Object[] data); long getTimestamp(); void setTimestamp(long timestamp); String getMetaVersion(); void setMetaVersion(String metaVersion); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static StreamEventBuilder builder(); StreamEvent copy(); void copyFrom(StreamEvent event); Object[] getData(); Object[] getData(StreamDefinition streamDefinition, List<String> column); Object[] getData(StreamDefinition streamDefinition, String... column);  }
@Test public void testStreamEventEqual() { Long timestamp = System.currentTimeMillis(); StreamEvent event1 = mockSimpleStreamEvent(timestamp); StreamEvent event2 = mockSimpleStreamEvent(timestamp); StreamEvent event3 = event2.copy(); Assert.assertEquals(event1, event2); Assert.assertEquals(event2, event3); }