}
@Test
public void testWilds()
{
ChannelId id = new ChannelId("/foo/bar/*");
List<String> wilds = id.getWilds();
Assert.assertEquals(0, wilds.size());
id = new ChannelId("/foo");
wilds = id.getWilds();
Assert.assertEquals(2, wilds.size());
Assert.assertEquals("/*", wilds.get(0));
Assert.assertEquals("/**", wilds.get(1));
id = new ChannelId("/foo/bar");
wilds = id.getWilds();
Assert.assertEquals(3, wilds.size());
Assert.assertEquals("/foo/*", wilds.get(0));
Assert.assertEquals("/foo/**", wilds.get(1));
Assert.assertEquals("/**", wilds.get(2));
id = new ChannelId("/foo/bar/bob");
wilds = id.getWilds();
Assert.assertEquals(4, wilds.size());
Assert.assertEquals("/foo/bar/*", wilds.get(0));
Assert.assertEquals("/foo/bar/**", wilds.get(1));
Assert.assertEquals("/foo/**", wilds.get(2));
Assert.assertEquals("/**", wilds.get(3));
id = new ChannelId("/foo/{bar}");
wilds = id.getWilds();
Assert.assertEquals(3, wilds.size());
Assert.assertEquals("/foo/*", wilds.get(0));
Assert.assertEquals("/foo/**", wilds.get(1));
Assert.assertEquals("/**", wilds.get(2));
id = new ChannelId("/foo/{bar}/baz");
wilds = id.getWilds();
Assert.assertEquals(2, wilds.size());
Assert.assertEquals("/foo/**", wilds.get(0));
Assert.assertEquals("/**", wilds.get(1));
}