RSocketRequester extends RequesterResponderSupport implements RSocket { @Override public Mono<Void> fireAndForget(Payload payload) { return new FireAndForgetRequesterMono(payload, this); } RSocketRequester(
      DuplexConnection connection,
      PayloadDecoder payloadDecoder,
      StreamIdSupplier streamIdSupplier,
      int mtu,
      int maxFrameLength,
      int maxInboundPayloadSize,
      int keepAliveTickPeriod,
      int keepAliveAckTimeout,
      @Nullable KeepAliveHandler keepAliveHandler,
      RequesterLeaseHandler leaseHandler); @Override Mono<Void> fireAndForget(Payload payload); @Override Mono<Payload> requestResponse(Payload payload); @Override Flux<Payload> requestStream(Payload payload); @Override Flux<Payload> requestChannel(Publisher<Payload> payloads); @Override Mono<Void> metadataPush(Payload payload); @Override int getNextStreamId(); @Override int addAndGetNextStreamId(FrameHandler frameHandler); @Override double availability(); @Override void dispose(); @Override boolean isDisposed(); @Override Mono<Void> onClose();  }
@Test public void ensuresThatNoOpsMustHappenUntilSubscriptionInCaseOfFnfCall() { Payload payload1 = ByteBufPayload.create("abc1"); Mono<Void> fnf1 = rule.socket.fireAndForget(payload1); Payload payload2 = ByteBufPayload.create("abc2"); Mono<Void> fnf2 = rule.socket.fireAndForget(payload2); Assertions.assertThat(rule.connection.getSent()).isEmpty(); AssertSubscriber<Void> voidAssertSubscriber2 = fnf2.subscribeWith(AssertSubscriber.create(0)); voidAssertSubscriber2.assertTerminated().assertNoError(); Assertions.assertThat(rule.connection.getSent()) .hasSize(1) .first() .matches(bb -> frameType(bb) == REQUEST_FNF) .matches(bb -> FrameHeaderCodec.streamId(bb) == 1) .matches( bb -> ByteBufUtil.equals( RequestFireAndForgetFrameCodec.data(bb), Unpooled.wrappedBuffer("abc2".getBytes()))) .matches(ReferenceCounted::release); rule.connection.clearSendReceiveBuffers(); AssertSubscriber<Void> voidAssertSubscriber1 = fnf1.subscribeWith(AssertSubscriber.create(0)); voidAssertSubscriber1.assertTerminated().assertNoError(); Assertions.assertThat(rule.connection.getSent()) .hasSize(1) .first() .matches(bb -> frameType(bb) == REQUEST_FNF) .matches(bb -> FrameHeaderCodec.streamId(bb) == 3) .matches( bb -> ByteBufUtil.equals( RequestFireAndForgetFrameCodec.data(bb), Unpooled.wrappedBuffer("abc1".getBytes()))) .matches(ReferenceCounted::release); }