assertEquals(expected, manager.urlFor(request, "entry", context));
}
@Test
public void testStaticResolve() throws Exception {
RouteManager manager = new RouteManager();
manager.addRoute(new Route("collection", "/:coll"), TargetType.TYPE_COLLECTION)
.addRoute(new Route("openSearch", "/openSearch.xml"), TargetType.TYPE_ENTRY);
RequestContext request = createMock(RequestContext.class);
expect(request.getTargetPath()).andReturn("/openSearch.xml");
replay(request);
RouteTarget target = (RouteTarget)manager.resolve(request);
assertEquals("/openSearch.xml", target.getRoute().getPattern());
}