Text { public static String capitalize(String s) { if (Strings.isNullOrEmpty(s)) return s; return s.substring(0, 1).toUpperCase() + s.substring(1); }  static String removeLast(String s); static String generateHash(String key); static String capitalize(String s); static String matchMax(String left, String right); static boolean containsEvilSpecialChar(String stringToCheck); static String containingString(String str, String prefix, String suffix);  }
@Test public void testCapitalize() { assertThat(Text.capitalize("doctor"), is("Doctor")); assertThat(Text.capitalize("docTor"), is("DocTor")); assertThat(Text.capitalize("a"), is("A")); assertThat(Text.capitalize(null), is(nullValue())); assertThat(Text.capitalize(""), is("")); }