UrlRewriter { public static RoutingGenerationContext urlFor(OptionMap options) { return new RoutingGenerationContext(options); }  static RoutingGenerationContext urlFor(OptionMap options); static RoutingGenerationContext urlFor(Class<?> controller, String optionString); static HttpResponse redirect(Class<?> controller, String options, HttpResponseUtils.RedirectStatusCode code); @SuppressWarnings("unchecked") static OptionMap parseOptionString(Class<?> controller, String optionString);  }
@Test void urlFor() { assertThat(UrlRewriter.urlFor(FooController.class, "index?d=4").getOptions()) .contains(entry("d", "4")) .contains(entry("controller", FooController.class)); }
@Test void urlForWithControllerParameter() { assertThat(UrlRewriter.urlFor(FooController.class, "index?controller=Bar").getOptions()) .contains(entry("controller", FooController.class)); }
@Test void urlForWithOptionMap() { assertThat(UrlRewriter.urlFor(OptionMap.of("e", "4")).getOptions()) .contains(entry("e", "4")); }