public static <StreamMessageType> void containsInAnyOrder(List<StreamMessageType> expected,
      InMemoryOutputDescriptor<StreamMessageType> outputDescriptor, Duration timeout) throws InterruptedException {
    Preconditions.checkNotNull(outputDescriptor);
    assertThat(TestRunner.consumeStream(outputDescriptor, timeout)
        .entrySet()
        .stream()
        .flatMap(entry -> entry.getValue().stream())
        .collect(Collectors.toList()), IsIterableContainingInAnyOrder.containsInAnyOrder(expected.toArray()));
  }
Verifies that the {@code expected} messages are present in any order in the single partition stream
represented by {@code outputDescriptor}

@param expected expected stream of messages
@param outputDescriptor describes the stream which will be consumed to compare against expected list
@param timeout maximum time to wait for consuming the stream
@param <StreamMessageType> type of messages in the stream
@throws InterruptedException when {@code consumeStream} is interrupted by another thread during polling messages
samza-test/src/main/java/org/apache/samza/test/framework/StreamAssert.java