@Test
  public void useAfterCloseTest() throws ClosedChannelException {
    ByteBufferChannel channel = new ByteBufferChannel(ByteBuffer.allocate(5));
    channel.write(ByteBuffer.wrap(new byte[1]));
    channel.close();
    try {
      channel.write(ByteBuffer.wrap(new byte[1]));
    } catch (ClosedChannelException e) {
      // expected. nothing to do.
    }
  }
Checks the case where a {@link ByteBufferChannel} is used after it has been closed.
@throws ClosedChannelException
ambry-utils/src/test/java/com/github/ambry/utils/ByteBufferChannelTest.java