@Test
  public void acquireClaimedConnectionOnClosedChannelShouldThrowIOException() {
    loopGroup.register(channel).awaitUninterruptibly();
    Promise<Channel> channelPromise = new DefaultPromise<>(loopGroup.next());

    MultiplexedChannelRecord record = new MultiplexedChannelRecord(channel, 1, 10000L, streamChannelInitializer);

    record.closeChildChannels();

    record.acquireClaimedStream(channelPromise);

    try {
      channelPromise.get();
    } catch (InterruptedException | ExecutionException e) {
      assertTrue(e.getCause() instanceof IOException);
    }
  }
IOException is expected if acquire stream from closed channel.
ambry-network/src/test/java/com/github/ambry/network/http2/MultiplexedChannelRecordTest.java