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

  rule.connection.addToReceivedBuffer(
      ErrorFrameCodec.encode(rule.alloc(), 0, new RejectedSetupException("boom")));
  Assertions.assertThatThrownBy(() -> rule.socket.onClose().block())
      .isInstanceOf(RejectedSetupException.class);
  rule.assertHasNoLeaks();
}