### Question:
RedirectUrlBuilder { public RedirectUrl build() { return new RedirectUrl(urlBuilder.build()); } RedirectUrlBuilder(final String redirectUrl); RedirectUrl build(); void appendParameters(final Map<String, String[]> parameters); void appendParameter(String name, String... values);  }### Answer:
@Test public void testWeCanBuildHashTaggedParamAreKept() throws Exception { final RedirectUrlBuilder redirectUrlBuilder = new RedirectUrlBuilder("myredirecturl?parambeforehash=true#hashparam=true"); final String url = redirectUrlBuilder.build().getUrl(); assertEquals("myredirecturl?parambeforehash=true#hashparam=true", url); }
@Test public void testPostParamsAreNotAddedToTheUrl() { final Map<String, String[]> parameters = new HashMap<String, String[]>(); parameters.put("postParam", someValues("true")); final RedirectUrlBuilder redirectUrlBuilder = new RedirectUrlBuilder("myredirecturl?someparam=value#hashparam=true"); final String url = redirectUrlBuilder.build().getUrl(); assertEquals("myredirecturl?someparam=value#hashparam=true", url); }