StringUtil { public static String humanize(String value) { return capitalize(replace(value, "_", " ")); }  static String humanize(String value); static String replaceAndHumanize(String value, String oldCharacter, String newCharacter); static String replaceAndHumanizeWithInitCapText(String value, String oldCharacter, String newCharacter); static String humanizeAndDoUPPERCASE(String value);  }
@Test public void shouldCapitalize() throws Exception { assertEquals("Abc", humanize("abc")); assertEquals("Abc", humanize("Abc")); }
@Test public void shouldReplaceUnderscoreWithSpace() throws Exception { assertEquals("Abc def", humanize("abc_def")); assertEquals("Abc def", humanize("Abc_def")); }
@Test public void shouldHandleEmptyAndNull() throws Exception { assertEquals("", humanize("")); assertEquals(null, humanize(null)); }