}
}
public void testAnonymousBind() throws Exception
{
acceptor.bind( null, new IoHandlerAdapter() );
Assert.assertEquals( 1, acceptor.getManagedServiceAddresses().size() );
acceptor.unbindAll();
Thread.sleep(500);
Assert.assertEquals( 0, acceptor.getManagedServiceAddresses().size() );
acceptor.bind( createSocketAddress( 0 ), new IoHandlerAdapter() );
Assert.assertEquals( 1, acceptor.getManagedServiceAddresses().size() );
SocketAddress address =
( SocketAddress ) acceptor.getManagedServiceAddresses().iterator().next();
Assert.assertTrue( getPort( address ) != 0 );
acceptor.unbind( address );