Code example for URI

Methods: getFragmentgetHostgetPathgetPortgetQuerygetSchemegetUserInfo

public class UrlBuilderTest { 
	protected UrlBuilder urlBuilder = new UrlBuilder();
	public void testParsing() 
		Map<String, String> params;
		params = urlBuilder.parseQueryParameters("a=b&c=d");
		assertEquals("b", params.get("a"));
		assertEquals("d", params.get("c"));
		params = urlBuilder.parseQueryParameters("a=b&c=");
		assertEquals("b", params.get("a"));
		assertEquals(null, params.get("c"));
	public void testRender() throws UrlBuilderException, URISyntaxException 
		URI baseUri = new URI("");
		Map<String, Object> parameters = new LinkedHashMap<>();
		URI result = urlBuilder.addQueryParameters(parameters, baseUri);
		assertEquals("", result.toString());
Connect your IDE to all the code out there  Get Codota for Java