@Test
public void shouldBindToSocketOnListen() throws Exception
{

    final TcpTransport tcpTransport = new TcpTransport(publishingTransportObserver, socketAddress, socketFactory, new TransportConfigImpl(false));
    mockery.checking(new Expectations()
    {
        {
            one(socketFactory).bind(socketAddress);
            will(returnValue(serverSocketChannel));
            one(socketFactory).createSocketOnIncomingConnection(with(serverSocketChannel), with(any(SocketFactory.SocketEstablishedCallback.class)));
        }
    });
    tcpTransport.listen();
}