assertEquals(2, data.getTokens().length);
assertTrue(data.isOptional(0));
}
public void testTokens() {
UrlMappingData data = new DefaultUrlMappingData("/blog/(*)/2007/(*)?");
String[] tokens = data.getTokens();
assertFalse(tokens.length == 0);
assertEquals("blog",tokens[0]);
assertEquals("(*)",tokens[1]);
assertEquals("2007",tokens[2]);
assertEquals("(*)?",tokens[3]);
assertFalse(data.isOptional(0));
assertTrue(data.isOptional(1));
}