@Override
      public String call() throws Exception {
        UUID uuid = DrainUtils.writeDrainNotification(metadataStore);
        return uuid.toString();
      }
This test will test drain and consumption of some messages from the in-memory topic.
In order to simulate the real-world behaviour of drain, the test adds messages to the in-memory topic buffer in
a delayed fashion instead of all at once. The test then writes the drain notification message to the in-memory
metadata store to drain and stop the pipeline. This write is done shortly after the pipeline starts and before all
the messages are written to the topic's buffer. As a result, the total count of the processed messages will be less
than the expected count of messages.
samza-test/src/test/java/org/apache/samza/test/drain/DrainLowLevelApiIntegrationTest.java