public void testFailoverURL() throws URLSyntaxException
{
String url = "amqp://ritchiem:bob@/test?brokerlist='tcp://localhost:5672;tcp://fancyserver:3000/',failover='roundrobin?cyclecount='100''";
ConnectionURL connectionurl = new AMQConnectionURL(url);
assertTrue(connectionurl.getFailoverMethod().equals("roundrobin"));
assertEquals("100", connectionurl.getFailoverOption(ConnectionURL.OPTIONS_FAILOVER_CYCLE));
assertTrue(connectionurl.getUsername().equals("ritchiem"));
assertTrue(connectionurl.getPassword().equals("bob"));
assertTrue(connectionurl.getVirtualHost().equals("/test"));
assertTrue(connectionurl.getBrokerCount() == 2);
BrokerDetails service = connectionurl.getBrokerDetails(0);
assertTrue(service.getTransport().equals("tcp"));
assertTrue(service.getHost().equals("localhost"));
assertTrue(service.getPort() == 5672);
service = connectionurl.getBrokerDetails(1);
assertTrue(service.getTransport().equals("tcp"));
assertTrue(service.getHost().equals("fancyserver"));
assertTrue(service.getPort() == 3000);