@Test
public void shouldStartByteChannelReaderOnConnectionEstablished() throws Exception
{

    deterministicExecutor = new DeterministicExecutor();
    final ChannelInitializer channelInitializer = new ChannelInitializer(transport, byteChannelReader, outboundMessageHandler, deterministicExecutor);
    mockery.checking(new Expectations()
    {
        {
            one(transport).getWritableByteChannel();
            will(returnValue(writableByteChannel));
            one(outboundMessageHandler).initialiseOutboundChannel(writableByteChannel);
        }
    });
    channelInitializer.connectionEstablished();
    mockery.checking(new Expectations()
    {
        {
            one(transport).getReadableByteChannel();
            will(returnValue(readableByteChannel));
            one(byteChannelReader).blockingStart(readableByteChannel);
        }
    });
    deterministicExecutor.runPendingCommands();
}