protected void waitForProcessorToStartStop(CountDownLatch waitObject) {
    LOG.info("Waiting on " + waitObject);
    try {
      if (!waitObject.await(30000, TimeUnit.MILLISECONDS)) {
        Assert.fail("Timed out while waiting for the processor to start/stop.");
      }
    } catch (InterruptedException e) {
      Assert.fail("Got interrupted while waiting for the processor to start/stop.");
    }
  }
Consumes data from the topic until there are no new messages for a while
and asserts that the number of consumed messages is as expected.
samza-test/src/test/java/org/apache/samza/processor/TestZkStreamProcessorBase.java