@Test
public void testScheduledCancelled() throws Exception {

    EmbeddedChannel ch = new EmbeddedChannel(new ChannelInboundHandlerAdapter());
    ScheduledFuture<?> future = ch.eventLoop().schedule(new Runnable() {
        @Override
        public void run() { }
    }, 1, TimeUnit.DAYS);
    ch.finish();
    assertTrue(future.isCancelled());
}