@Test public void shouldReturnWantedUrlForOverrideMethodWithParialParamArgs() throws SecurityException, NoSuchMethodException { String a = "test"; when(router.urlFor(SubGenericController.class, SubGenericController.class.getDeclaredMethod("anotherMethod", new Class[]{String.class, String.class}), new Object[]{a, null})).thenReturn("/expectedURL"); String uri = handler.get(SubGenericController.class).get("anotherMethod").get(a).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);  }