protected void verifyNumMessages(String topic, int numberOfSequentialValues, int expectedNumMessages) {
    // we should get each value one time
    // create a map of all expected values to validate
    Map<Integer, Boolean> expectedValues = new HashMap<>(numberOfSequentialValues);
    for (int i = 0; i < numberOfSequentialValues; i++) {
      expectedValues.put(i, false);
    }
    verifyNumMessages(topic, expectedValues, expectedNumMessages);
  }
Runs the provided stream processor by starting it, waiting on the provided latch with a timeout,
and then stopping it.
samza-test/src/test/java/org/apache/samza/processor/TestZkStreamProcessorBase.java