setTestSystemProperty(ClientProperties.DEST_SYNTAX, "ADDR");
setTestSystemProperty(InitialContext.INITIAL_CONTEXT_FACTORY, "org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
setTestSystemProperty(InitialContext.PROVIDER_URL, f.toURI().toURL().toString());
InitialContext context = new InitialContext();
Destination dest = (Destination) context.lookup("topicExchange");
assertNotNull("Lookup from URI based context should not be null", dest);
assertTrue("Unexpected value from lookup", dest.toString().contains("destName"));
ConnectionFactory factory = (ConnectionFactory) context.lookup("qpidConnectionfactory");
assertTrue("ConnectionFactory was not an instance of AMQConnectionFactory", factory instanceof AMQConnectionFactory);
assertEquals("Unexpected ConnectionURL value", CONNECTION_URL.replaceAll("password", "********"),
((AMQConnectionFactory)factory).getConnectionURLString());