private long computedSum(StreamMessage<Integer> stream) {
            stream.whenComplete().join();
            final long computedSum = subscriber.sum();
            if (computedSum != sum) {
                throw new IllegalStateException(
                        "Did not compute the expected sum, the stream implementation is broken, expected: " +
                        sum + ", got: " + computedSum);
            }
            return computedSum;
        }
Microbenchmarks of {@link StreamMessage Stream Messages}.
benchmarks/jmh/src/jmh/java/com/linecorp/armeria/common/stream/StreamMessageBenchmark.java