RequestResponseRequesterMono extends Mono<Payload> implements RequesterFrameHandler, Subscription, Scannable { @Override public final void cancel() { long previousState = markTerminated(STATE, this); if (isTerminated(previousState)) { return; } if (isFirstFrameSent(previousState)) { final int streamId = this.streamId; this.requesterResponderSupport.remove(streamId, this); ReassemblyUtils.synchronizedRelease(this, previousState); this.connection.sendFrame(streamId, CancelFrameCodec.encode(this.allocator, streamId)); } else if (!hasRequested(previousState)) { this.payload.release(); } } RequestResponseRequesterMono(
      Payload payload, RequesterResponderSupport requesterResponderSupport); @Override void subscribe(CoreSubscriber<? super Payload> actual); @Override final void request(long n); @Override final void cancel(); @Override final void handlePayload(Payload value); @Override final void handleComplete(); @Override final void handleError(Throwable cause); @Override void handleNext(ByteBuf frame, boolean hasFollows, boolean isLastPayload); @Override CompositeByteBuf getFrames(); @Override void setFrames(CompositeByteBuf byteBuf); @Override @Nullable Object scanUnsafe(Attr key); @Override @NonNull String stepName();  }
@Test public void checkName() { final TestRequesterResponderSupport activeStreams = TestRequesterResponderSupport.client(); final LeaksTrackingByteBufAllocator allocator = activeStreams.getAllocator(); final Payload payload = genericPayload(allocator); final RequestResponseRequesterMono requestResponseRequesterMono = new RequestResponseRequesterMono(payload, activeStreams); Assertions.assertThat(Scannable.from(requestResponseRequesterMono).name()) .isEqualTo("source(RequestResponseMono)"); requestResponseRequesterMono.cancel(); allocator.assertHasNoLeaks(); }