@Test
    void abortedStreamCallOnCompleteIfNoData() throws InterruptedException {
        final StreamWriter<Object> stream = new DefaultStreamMessage<>();
        stream.close();

        final AtomicBoolean onCompleteCalled = new AtomicBoolean();
        stream.subscribe(new Subscriber<Object>() {
            @Override
            public void onSubscribe(Subscription s) {}

            @Override
            public void onNext(Object o) {}

            @Override
            public void onError(Throwable t) {
                fail();
            }

            @Override
            public void onComplete() {
                onCompleteCalled.set(true);
            }
        }, ImmediateEventExecutor.INSTANCE);

        stream.abort();
        assertThat(onCompleteCalled.get()).isTrue();
    }
Makes sure {@link Subscriber#onComplete()} is always invoked after
{@link Subscriber#onSubscribe(Subscription)} even if
{@link StreamMessage#subscribe(Subscriber, EventExecutor, SubscriptionOption...)}
is called from non-{@link EventLoop}.
core/src/test/java/com/linecorp/armeria/common/stream/DefaultStreamMessageTest.java