@Override
          public void onEvent(ByteBufferAsyncWritableChannel.EventType e) {
            if (e == ByteBufferAsyncWritableChannel.EventType.Write) {
              writeNotified.set(true);
            } else if (e == ByteBufferAsyncWritableChannel.EventType.Close) {
              closeNotified.set(true);
            }
          }
Test to verify notification for all channel events.
ambry-commons/src/test/java/com/github/ambry/commons/ByteBufferAsyncWritableChannelTest.java