Tools { @Nullable public static String capitalizeFirstLetter(@Nullable final String word) { if (word == null) { return null; } if (word.length() == 0) { return word; } return word.substring(0, 1).toUpperCase() + word.substring(1); } private  Tools(); static String getTime(); static String getDoubleDigit(final int number); static String dateToString(@Nullable final Date d, final String format); static String decimalFormat(final String format, final double number); static boolean isValidNick(@Nullable final String nick); static String byteToString(final long bytes); static int getBytes(final String text); static void sleep(final long millis); @Nullable static String capitalizeFirstLetter(@Nullable final String word); @Nullable static String shorten(@Nullable final String word, final int length); @Nullable static String getFileExtension(@Nullable final String filename); @Nullable static String getFileBaseName(@Nullable final String filename); static double percent(final double fraction, final double total); static double percentOf(final double percent, final double total); static String postPadString(final String stringToPad, final int paddedLength); static boolean isEmpty(@Nullable final String string); static String appendSlash(final String path); static File getFileWithIncrementedName(final File existingFile); static String emptyIfNull(@Nullable final String string);  }
@Test public void testCapitalizeFirstLetter() { assertNull(Tools.capitalizeFirstLetter(null)); assertEquals("Monkey", Tools.capitalizeFirstLetter("monkey")); assertEquals("Kou", Tools.capitalizeFirstLetter("kou")); assertEquals("Up", Tools.capitalizeFirstLetter("up")); assertEquals("O", Tools.capitalizeFirstLetter("o")); assertEquals("-", Tools.capitalizeFirstLetter("-")); assertEquals("", Tools.capitalizeFirstLetter("")); assertEquals("CAKE", Tools.capitalizeFirstLetter("CAKE")); assertEquals("123", Tools.capitalizeFirstLetter("123")); }