@Override
        public void receive(long timestamp, Event[] inEvents, Event[] removeEvents) {

            // Print the events
            EventPrinter.print(timestamp, inEvents, removeEvents);

            if (inEvents != null) {
                eventArrived = true;
                for (Event event : inEvents) {
                    int inEvent = inEventCount.incrementAndGet();
                    if (noOfExpectedEvents > 0 && inEvent <= noOfExpectedEvents) {
                        try {
                            AssertJUnit.assertArrayEquals(expected[inEvent - 1], event.getData());
                        } catch (AssertionError e) {
                            assertionErrors.add(e);
                        }
                    }
                }
            }
            if (removeEvents != null) {
                removeEventCount.addAndGet(removeEvents.length);
            }
        }
Throw all the {@link AssertionError}s captured while testing.
modules/siddhi-core/src/test/java/io/siddhi/core/TestUtil.java