@Test public void shouldReturnWantedUrlWithParamArgs() { String a = "test"; int b = 3; when(router.urlFor(TestController.class, method2params, new Object[]{a, b})).thenReturn("/expectedURL"); String uri = handler.get(TestController.class).get("method").get(a).get(b).toString(); assertThat(uri, is("/path/expectedURL")); }
@Override public LinkMethod get(Object key) { return new LinkMethod((Class<?>) key); }
LinkToHandler extends ForwardingMap<Class<?>, Object> { @Override public LinkMethod get(Object key) { return new LinkMethod((Class<?>) key); } }
LinkToHandler extends ForwardingMap<Class<?>, Object> { @Override public LinkMethod get(Object key) { return new LinkMethod((Class<?>) key); } LinkToHandler(ServletContext context, Router router); }
LinkToHandler extends ForwardingMap<Class<?>, Object> { @Override public LinkMethod get(Object key) { return new LinkMethod((Class<?>) key); } LinkToHandler(ServletContext context, Router router); void start(); @Override LinkMethod get(Object key); }
LinkToHandler extends ForwardingMap<Class<?>, Object> { @Override public LinkMethod get(Object key) { return new LinkMethod((Class<?>) key); } LinkToHandler(ServletContext context, Router router); void start(); @Override LinkMethod get(Object key);  }