RouteModel implements Serializable { Map<String, RouteTarget> getRoutes() { return root.getRoutes(); } private  RouteModel(boolean mutable); private  RouteModel(RouteSegment root, boolean mutable);   }
@Test public void route_model_provides_routes() { RouteModel root = getRouteModel(); final Map<String, RouteTarget> routes = root.getRoutes(); Assert.assertEquals("Incorrect routes size", 8, routes.size()); final String template = "trunk/branch/:id(" + RouteParameterRegex.INTEGER + ")/:list*(" + RouteParameterRegex.LONG + ")"; Assert.assertEquals("Wrong route mapping", BranchChildren.class, routes.get(template).getTarget()); }