@Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof BatchEventData that)) {
            return false;
        }

        return events != null ? events.equals(that.events) : that.events == null;
    }
@Test
    public void testEquals() {
        assertEquals(batchEventData, batchEventData);
        assertEquals(batchEventData, batchEventDataSameAttribute);

        assertNotEquals(null, batchEventData);
        assertNotEquals(new Object(), batchEventData);

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