@Test
    void closingDuplicatorDoesNotAbortDuplicatedStream() {
        final StreamWriter<HttpData> publisher = StreamMessage.streaming();
        final StreamMessageDuplicator<HttpData> duplicator =
                publisher.toDuplicator(ImmediateEventExecutor.INSTANCE);
        final HttpDataSubscriber subscriber = new HttpDataSubscriber();

        duplicator.duplicate().subscribe(subscriber, ImmediateEventExecutor.INSTANCE);
        duplicator.close();
        // duplicate() is not allowed anymore.
        assertThatThrownBy(duplicator::duplicate).isInstanceOf(IllegalStateException.class);

        assertThat(subscriber.completionFuture().isDone()).isFalse();
        publisher.close();
        assertThat(subscriber.completionFuture().isDone()).isTrue();
    }
A test for the {@link SignalQueue} in {@link DefaultStreamMessageDuplicator}.
Queue expansion behaves differently when odd/even number head wrap-around happens.
core/src/test/java/com/linecorp/armeria/common/stream/StreamMessageDuplicatorTest.java