@Test
public void shouldLogChannelWritabilityChanged() throws Exception {

    EmbeddedChannel channel = new EmbeddedChannel(new LoggingHandler());
    // this is used to switch the channel to become unwritable
    channel.config().setWriteBufferLowWaterMark(5);
    channel.config().setWriteBufferHighWaterMark(10);
    channel.write("hello", channel.newPromise());
    verify(appender).doAppend(argThat(new RegexLogMatcher(".+WRITABILITY CHANGED$")));
}