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

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