public static void waitForComplete() {
    try {
      while (!LATCHES.isEmpty()) {
        final Set<String> ids  = new HashSet<>(LATCHES.keySet());
        for (String id : ids) {
          while (LATCHES.get(id) == PLACE_HOLDER) {
            Thread.sleep(100);
          }

          final CountDownLatch latch = LATCHES.get(id);
          if (latch != null) {
            latch.await();
            LATCHES.remove(id);
          }
        }
      }
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
Constructors a MessageStreamAssert with an id and serde
@param id unique id
@param messageStream represents messageStream that you want to assert on
@param serde serde used to desialize messageStream
@param <M> represents type of Message
@return MessageStreamAssert that returns the the messages in the stream
samza-test/src/main/java/org/apache/samza/test/framework/MessageStreamAssert.java