public void testCommaSeperatedHostnames() throws Exception
{
RuleInfo firstRule = new RuleInfo();
firstRule.setAccess("allow");
firstRule.setHostname("foo, bar, "+new InetSocketAddress("127.0.0.1", 5672).getHostName());
Firewall plugin = initialisePlugin("deny", new RuleInfo[]{firstRule});
// Set IP so that we're connected from the right address
_address = new InetSocketAddress("10.0.0.1", 65535);
assertEquals(Result.DENIED, plugin.access(ObjectType.VIRTUALHOST, _address));
// Set IP so that we're connected from the right address
_address = new InetSocketAddress("127.0.0.1", 65535);
assertEquals(Result.ALLOWED, plugin.access(ObjectType.VIRTUALHOST, _address));
}