### Question:
TextUtil { public static String urlEncodeUTF8( final String text ) { if ( text == null ) { return ""; } return urlEncode( text.getBytes( StandardCharsets.UTF_8 ) ); } private  TextUtil(); static String urlEncodeUTF8( final String text ); static String urlDecodeUTF8( final String utf8 ); static String urlEncode( final String data, final String encoding ); static String urlDecode( final String data, final String encoding ); static String replaceEntities( String src ); static String replaceString( final String orig, final String src, final String dest ); static String replaceString( final String orig, final int start, final int end, final String text ); static String replaceStringCaseUnsensitive( final String orig, final String src, final String dest ); static int parseIntParameter( final String value, final int defvalue ); static int getIntegerProperty( final Properties props, final String key, final int defVal ); static boolean getBooleanProperty( final Properties props, final String key, final boolean defval ); static String getStringProperty( final Properties props, final String key, final String defval ); static String getRequiredProperty( final Properties props, final String key ); static String getCanonicalFilePathProperty( final Properties props, final String key, final String defval ); static boolean isPositive( String val ); static String normalizePostData( final String postData ); static String beautifyString( final String s ); static String beautifyString( final String s, final String space ); static String cleanString( String text, final String allowedChars ); static Properties createProperties( final String[] values ); static int countSections( final String pagedata ); static String getSection( final String pagedata, final int section ); static String repeatString( final String what, final int times ); static String native2Ascii( final String s ); static String toHexString( final byte[] bytes ); static boolean isNumber( String s ); static String generateRandomPassword(); static final int PASSWORD_LENGTH; static final String LEGACY_CHARS_ALLOWED; static final String PUNCTUATION_CHARS_ALLOWED; }### Answer:
@Test public void testEncodeNameUTF8_1() { final String name = "\u0041\u2262\u0391\u002E"; Assertions.assertEquals( "A%E2%89%A2%CE%91.", TextUtil.urlEncodeUTF8(name) ); }
@Test public void testEncodeNameUTF8_2() { final String name = "\uD55C\uAD6D\uC5B4"; Assertions.assertEquals( "%ED%95%9C%EA%B5%AD%EC%96%B4", TextUtil.urlEncodeUTF8(name) ); }
@Test public void testEncodeNameUTF8_3() { final String name = "\u65E5\u672C\u8A9E"; Assertions.assertEquals( "%E6%97%A5%E6%9C%AC%E8%AA%9E", TextUtil.urlEncodeUTF8(name) ); }
@Test public void testEncodeNameUTF8_4() { final String name = "Hello World"; Assertions.assertEquals( "Hello+World", TextUtil.urlEncodeUTF8(name) ); }