@SuppressWarnings( { "rawtypes", "unchecked" })
private ChannelHandlerContext channelHandlerContext() {
final ChannelHandlerContext ctx = mock(ChannelHandlerContext.class);
final EventExecutor eventExecutor = mock(EventExecutor.class);
final ScheduledFuture future = mock(ScheduledFuture.class);
when(eventExecutor.scheduleAtFixedRate(any(Runnable.class), anyLong(), anyLong(), any(TimeUnit.class))).thenReturn(future);
when(ctx.executor()).thenReturn(eventExecutor);
when(ctx.pipeline()).thenReturn(mock(ChannelPipeline.class));
return ctx;
}