### Question:
URL { public static String filledURL(String url, Object parameter) { final UriComponents uricomponent = getUriComponent(url); return uricomponent.expand(parameter).encode().toUriString(); } private  URL(); static String filledURL(String url, Object parameter); static String filledURL(String url); static String filledURLWithNamedParams(String url,
            Object... keyValuePairs); static String filledURL(String url, Map<String, ?> parameters); static String redirect(String url, Object parameter); static String redirect(String url); static String redirectWithNamedParams(String url,
            Object... keyValuePairs); static String redirect(String url,
            Map<String, String> namedParameters); static final String HOME; }### Answer:
@Test public void testFilledURLStringStringArrayWithEmptyArray() { final String templateString = "quick brown fox lazy dog."; final String result = URL.filledURL(templateString); assertThat(result).isEqualTo("quick%20brown%20fox%20lazy%20dog."); }
@Test public void testFilledURLStringStringArrayWithrealUrlAndSpecialCharacters() { final String templateString = "http: final String result = URL.filledURL(templateString, "äöü"); assertThat(result) .isEqualTo( "http: }
@Test public void testFilledURLStringMapOfStringString() { final Map<String, String> valuesMap = new HashMap<String, String>(); valuesMap.put("animal", "quick brown fox"); valuesMap.put("target", "lazy dog"); valuesMap.put("notused", "notused"); final String templateString = "The {animal} jumped over the {target}."; final String result = URL.filledURL(templateString, valuesMap); assertThat(result) .isEqualTo( "The%20quick%20brown%20fox%20jumped%20over%20the%20lazy%20dog."); }