### Question:
WordUtils { public static String capitalize(final String str) { if (str == null) { return null; } switch (str.length()) { case 0: return str; case 1: return str.toUpperCase(); default: return str.substring(0, 1).toUpperCase() + str.substring(1); } }  static String getLastWord(final String sentence); static String capitalize(final String str); static boolean isNumber(String word);  }### Answer:
@Test public void testCapitalize() { assertEquals(capitalize(null), null); assertEquals(capitalize(""), ""); assertEquals(capitalize("hola"), "Hola"); assertEquals(capitalize("hOLA"), "HOLA"); }