Reference ref1 = new Reference(
"http://localhost/search?q=anythingelse%");
String query = ref1.getQuery();
assertEquals("q=anythingelse%25", query);
Form queryForm = ref1.getQueryAsForm();
assertEquals("anythingelse%", queryForm.getFirstValue("q"));
Form extJsQuery = new Form(
"&_dc=1244741620627&callback=stcCallback1001");
assertEquals("1244741620627", extJsQuery.getFirstValue("_dc"));
assertEquals("stcCallback1001", extJsQuery.getFirstValue("callback"));
Reference ref = new Reference("http://localhost/v1/projects/13404");
ref.addQueryParameter("dyn", "true");
assertEquals("http://localhost/v1/projects/13404?dyn=true",
ref.toString());