### Question:
ASCII { public static String toUpperCase(@Nullable String text) { if (text == null) return null; int length = text.length(); for (int i = 0; i < length; i++) { if (isLowerCase(text.charAt(i))) { char[] chars = text.toCharArray(); for (int j = i; j < length; j++) { char ch = chars[j]; if (isLowerCase(ch)) { chars[j] = (char) (ch & 0x5F); } } return String.valueOf(chars); } } return text; }  static String toUpperCase(@Nullable String text); static char toUpperCase(char ch); static String toLowerCase(@Nullable String text); static char toLowerCase(char ch); static boolean isLowerCase(char ch); static boolean isUpperCase(char ch); static boolean isDigit(char ch); static boolean isLetter(char ch);  }### Answer:
@Test void toUpperCase() { assertThat(ASCII.toUpperCase(null)).isNull(); assertThat(ASCII.toUpperCase("text")).isEqualTo("TEXT"); assertThat(ASCII.toUpperCase("tExt")).isEqualTo("TEXT"); assertThat(ASCII.toUpperCase("TEXT")).isEqualTo("TEXT"); assertThat(ASCII.toUpperCase("01239_-")).isEqualTo("01239_-"); }
@Test void toUpperCaseChar() { assertThat(ASCII.toUpperCase('-')).isEqualTo('-'); assertThat(ASCII.toUpperCase('a')).isEqualTo('A'); assertThat(ASCII.toUpperCase('z')).isEqualTo('Z'); assertThat(ASCII.toUpperCase('0')).isEqualTo('0'); assertThat(ASCII.toUpperCase('9')).isEqualTo('9'); assertThat(ASCII.toUpperCase('A')).isEqualTo('A'); assertThat(ASCII.toUpperCase('Z')).isEqualTo('Z'); }