@Test(timeout = 2000)
public void testFireChannelInactiveAndUnregisteredOnDisconnect() throws InterruptedException {

    testFireChannelInactiveAndUnregistered(new Action() {
        @Override
        public ChannelFuture doRun(Channel channel) {
            return channel.disconnect();
        }
    });
    testFireChannelInactiveAndUnregistered(new Action() {
        @Override
        public ChannelFuture doRun(Channel channel) {
            return channel.disconnect(channel.newPromise());
        }
    });
}