@Test
public void testGetEncodedParameter_withDefault_usesDefaultWhenParameterMissing() throws Exception {

    final String url = "url";
    final String foobar = "foo/bar!";
    final HttpRequest request = new HttpRequest(url, (String)null);
    assertThat(request.getEncodedParameter("missing", foobar), equalTo(Util.urlEncoder(foobar)));
}