@Test
    void abortAndSubscribe() throws Exception {
        final DefaultStreamMessage<String> streamMessage = new DefaultStreamMessage<>();
        final BlockingQueue<String> queue = new LinkedBlockingQueue<>();
        final CountDownLatch latch = new CountDownLatch(1);
        eventLoop.get().execute(() -> {
            try {
                latch.await();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            streamMessage.abort();
        });
        streamMessage.subscribe(new Subscriber<String>() {
            @Override
            public void onSubscribe(Subscription subscription) {
                assertThat(eventLoop.get().inEventLoop()).isTrue();
                queue.add("onSubscribe");
            }

            @Override
            public void onNext(String s) {
                queue.add("onNext");
            }

            @Override
            public void onError(Throwable throwable) {
                assertThat(eventLoop.get().inEventLoop()).isTrue();
                queue.add("onError");
            }

            @Override
            public void onComplete() {
                queue.add("onComplete");
            }
        }, eventLoop.get());
        latch.countDown();
        await().untilAsserted(() -> assertThat(queue).containsExactly("onSubscribe", "onError"));
    }
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