@Test
public void testAddParameter() throws Exception {

    final URI uri = new URI("http", null, "localhost", 80, "/", "param=stuff&blah&blah", null);
    final URIBuilder uribuilder = new URIBuilder(uri).addParameter("param", "some other stuff")
        .addParameter("blah", "blah");
    final URI result = uribuilder.build();
    Assert.assertEquals(new URI("http://localhost:80/?param=stuff&blah&blah&" +
            "param=some%20other%20stuff&blah=blah"), result);
}