### Question:
Utf8UrlEncoder { public static String encodeQueryElement(String input) { StringBuilder sb = new StringBuilder(input.length() + 6); encodeAndAppendQueryElement(sb, input); return sb.toString(); } private  Utf8UrlEncoder(); static String encodePath(String input); static StringBuilder encodeAndAppendQuery(StringBuilder sb, String query); static String encodeQueryElement(String input); static StringBuilder encodeAndAppendQueryElement(StringBuilder sb, CharSequence input); static StringBuilder encodeAndAppendFormElement(StringBuilder sb, CharSequence input); static String percentEncodeQueryElement(String input); static StringBuilder encodeAndAppendPercentEncoded(StringBuilder sb, CharSequence input);  }### Answer:
@Test public void testBasics() { assertEquals(Utf8UrlEncoder.encodeQueryElement("foobar"), "foobar"); assertEquals(Utf8UrlEncoder.encodeQueryElement("a&b"), "a%26b"); assertEquals(Utf8UrlEncoder.encodeQueryElement("a+b"), "a%2Bb"); }