### Question:
StringUtil { public static String capitalize(final String str) { int strLen; if (str == null || (strLen = str.length()) == 0) { return str; } final char firstChar = str.charAt(0); if (Character.isTitleCase(firstChar)) { return str; } return new StringBuilder(strLen) .append(Character.toTitleCase(firstChar)) .append(str.substring(1)) .toString(); } private  StringUtil(); static boolean isEmpty(String val); static boolean isNotEmpty(String val); static boolean isBlank(final CharSequence cs); static boolean isNotBlank(final CharSequence cs); static boolean contains(String val, char charToSearchFor); static boolean equalsIgnoreCase(String str1, String str2); static String[] split(String str, String token, int max); static String replace(String str, String from, String to); static String trim(final String str); static String trimToNull(String str); static String join(Object[] values, String joinToken); static T parse(String val, Class<T> type); static String capitalize(final String str); static String uncapitalize(final String str); static boolean endsWithIgnoreCase(String str, String suffix); static String stripEnd(final String str, final String stripChars);  }### Answer:
@Test public void testStringCapitalize() { Assert.assertNull(StringUtil.capitalize(null)); Assert.assertEquals("", StringUtil.capitalize("")); Assert.assertEquals(" ", StringUtil.capitalize(" ")); Assert.assertEquals("Ahoi", StringUtil.capitalize("ahoi")); Assert.assertEquals("Ahoi", StringUtil.capitalize("Ahoi")); Assert.assertEquals(" ahoi", StringUtil.capitalize(" ahoi")); Assert.assertEquals("\u00d6hoi", StringUtil.capitalize("\u00f6hoi")); Assert.assertEquals("\u00dfhoi", StringUtil.capitalize("\u00dfhoi")); }