public static void waitForInEvents(long sleepTime, TestUtil.TestCallback callback, int retryCount)
            throws InterruptedException {
        int count = 0;
        while (true) {
            Thread.sleep(sleepTime);
            count += 1;
            if (callback.getInEventCount() == 1 || count == retryCount) {
                break;
            }
        }
    }
Add a callback to the given {@link SiddhiAppRuntime} and validate the assertions.

@param siddhiAppRuntime the SiddhiAppRuntime
@param streamName       the stream
@param expected         expected event data
@return TestCallback
modules/siddhi-core/src/test/java/io/siddhi/core/TestUtil.java