@Override
    public int hashCode() {
        return events != null ? events.hashCode() : 0;
    }
@Test
    public void testHashCode() {
        assertEquals(batchEventData.hashCode(), batchEventData.hashCode());
        assertEquals(batchEventData.hashCode(), batchEventDataSameAttribute.hashCode());

        assertEquals(batchEventData.hashCode(), batchEventDataOtherSource.hashCode());
        assertEquals(batchEventData.hashCode(), batchEventDataOtherPartitionId.hashCode());
        assumeDifferentHashCodes();
        assertNotEquals(batchEventData.hashCode(), batchEventDataOtherEvent.hashCode());
        assertNotEquals(batchEventData.hashCode(), batchEventDataNoEvent.hashCode());
    }