AbstractChannel extends DefaultAttributeMap implements Channel { @Override public ChannelPipeline pipeline() { return pipeline; } protected  AbstractChannel(Channel parent); @Override boolean isWritable(); @Override Channel parent(); @Override ChannelPipeline pipeline(); @Override ByteBufAllocator alloc(); @Override EventLoop eventLoop(); @Override SocketAddress localAddress(); @Override SocketAddress remoteAddress(); @Override boolean isRegistered(); @Override ChannelFuture bind(SocketAddress localAddress); @Override ChannelFuture connect(SocketAddress remoteAddress); @Override ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress); @Override ChannelFuture disconnect(); @Override ChannelFuture close(); @Override ChannelFuture deregister(); @Override Channel flush(); @Override ChannelFuture bind(SocketAddress localAddress, ChannelPromise promise); @Override ChannelFuture connect(SocketAddress remoteAddress, ChannelPromise promise); @Override ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise); @Override ChannelFuture disconnect(ChannelPromise promise); @Override ChannelFuture close(ChannelPromise promise); @Override ChannelFuture deregister(ChannelPromise promise); @Override Channel read(); @Override ChannelFuture write(Object msg); @Override ChannelFuture write(Object msg, ChannelPromise promise); @Override ChannelFuture writeAndFlush(Object msg); @Override ChannelFuture writeAndFlush(Object msg, ChannelPromise promise); @Override ChannelPromise newPromise(); @Override ChannelProgressivePromise newProgressivePromise(); @Override ChannelFuture newSucceededFuture(); @Override ChannelFuture newFailedFuture(Throwable cause); @Override ChannelFuture closeFuture(); @Override Unsafe unsafe(); @Override final int hashCode(); @Override final boolean equals(Object o); @Override final int compareTo(Channel o); @Override String toString(); @Override final ChannelPromise voidPromise();  }
@Test public void ensureInitialRegistrationFiresActive() throws Throwable { EventLoop eventLoop = createNiceMock(EventLoop.class); expect(eventLoop.inEventLoop()).andReturn(true).anyTimes(); TestChannel channel = new TestChannel(); ChannelInboundHandler handler = createMock(ChannelInboundHandler.class); handler.handlerAdded(anyObject(ChannelHandlerContext.class)); expectLastCall(); Capture<Throwable> throwable = catchHandlerExceptions(handler); handler.channelRegistered(anyObject(ChannelHandlerContext.class)); expectLastCall().once(); handler.channelActive(anyObject(ChannelHandlerContext.class)); expectLastCall().once(); replay(handler, eventLoop); channel.pipeline().addLast(handler); registerChannel(eventLoop, channel); checkForHandlerException(throwable); verify(handler); }