@Test
public void testDashedRouteWithSubstitution() throws Exception {
Map<String, String> defaults = new HashMap<String, String>();
defaults.put("foo", "f");
Route route = new Route("entry", ":collection/:entry-:foo", defaults, null);
HashMapContext ctx = new HashMapContext();
ctx.put("collection", "c");
ctx.put("entry", "e");
assertEquals("c/e-f", route.expand(ctx));
assertTrue(route.match("1/2-3"));
assertFalse(route.match("1/2-"));
assertFalse(route.match("1/-"));
}