assertEquals(0, vars.size());
}
@Test
public void testTwoPathRoute() throws Exception {
Route route = new Route("entry", "/:collection/:entry");
HashMapContext ctx = new HashMapContext();
ctx.put("collection", "c");
ctx.put("entry", "e");
assertEquals("/c/e", route.expand(ctx));
assertFalse(route.match("/foo"));
assertTrue(route.match("/foo/test"));
assertFalse(route.match("foo"));
assertFalse(route.match("/foo/test/bar"));
Map<String, String> vars = route.parse("/1/2");
assertEquals("1", vars.get("collection"));
assertEquals("2", vars.get("entry"));
vars = route.parse("/1/");
assertEquals("1", vars.get("collection"));
assertNull(vars.get("entry"));
}