@Test
@Timeout(2_000)
public void testStreamInitialN() {

  Flux<Payload> stream = rule.socket.requestStream(EmptyPayload.INSTANCE);
  BaseSubscriber<Payload> subscriber =
      new BaseSubscriber<Payload>() {
        @Override
        protected void hookOnSubscribe(Subscription subscription) {
          // don't request here
        }
      };
  stream.subscribe(subscriber);
  Assertions.assertThat(rule.connection.getSent()).isEmpty();
  subscriber.request(5);
  List<ByteBuf> sent = new ArrayList<>(rule.connection.getSent());
  assertThat("sent frame count", sent.size(), is(1));
  ByteBuf f = sent.get(0);
  assertThat("initial frame", frameType(f), is(REQUEST_STREAM));
  assertThat("initial request n", RequestStreamFrameCodec.initialRequestN(f), is(5L));
  assertThat("should be released", f.release(), is(true));
  rule.assertHasNoLeaks();
}