### Question:
Utility { public static String capitalizeFirstLetter(String text) { if (text == null) { return null; } else if (text.length() == 0) { return ""; } else if (text.length() == 1) { return text.toUpperCase(); } return text.substring(0, 1).toUpperCase() + text.substring(1); }  static String formatDate(Date messageDate); static boolean isEmpty(Collection<?> collection); static String formatTimestamp(Context context, long timestamp); static String removeWhitespaces(String s); static boolean validateUrl(String url); static boolean isConnected(Context context); static void showNotification(Context context); static BuildNotification getSyncNotificationStatus(Context context,
            String message); static void showSyncNotificationStatus(Context context, String message,
            BuildNotification buildNotification); static void buildNotification(Context context, int drawable,
            String message, String title, PendingIntent intent, boolean ongoing); static void clearAll(Context context); static void clearNotify(Context context); static void connectToDataNetwork(@NonNull Context context); static String getPhoneNumber(@NonNull Context context, @NonNull PrefsFactory prefs); static String capitalizeFirstLetter(String text); static char getFirstCharacter(String name); static void makeDefaultSmsApp(Activity activity); static boolean isDefaultSmsApp(Context context); static int calculateBatteryLevel(int level, int scale); static int dipToPixels(Context context, float dipValue); static int keywordColor(); @DrawableRes static int keywordIcon(); static final int NOTIFICATION_PROGRESS_BAR_MAX; static final int SET_DEFAULT_SMS_REQUEST; }### Answer:
@Test public void stringCapitalisationShouldWorkForNull() { assertNull(Utility.capitalizeFirstLetter(null)); }
@Test public void stringCapitalisationShouldWorkForEmptyString() { assertEquals("", Utility.capitalizeFirstLetter("")); }
@Test public void stringCapitalisationShouldWorkForSingleCharacterString() { assertEquals("A", Utility.capitalizeFirstLetter("a")); }
@Test public void stringCapitalisationShouldWorkForTwoCharacterString() { assertEquals("Ab", Utility.capitalizeFirstLetter("ab")); }
@Test public void stringCapitalisationShouldWorkForLongerString() { assertEquals("AbRaCaDaBrA", Utility.capitalizeFirstLetter("abRaCaDaBrA")); }