EasyMock.expect(channel.getRemoteAddress()).andReturn(remoteAddress).anyTimes();
EasyMock.expect(channel.getPipeline()).andReturn(pipeline).anyTimes();
EasyMock.expect(channel.getConfig()).andReturn(new DefaultChannelConfig()).anyTimes();
EasyMock.replay(channel);
pipeline.attach(channel, new AbstractChannelSink()
{
@Override
public void eventSunk(ChannelPipeline pipeline, ChannelEvent e) { return; }
});
}