CaseUtil { public static boolean isAllUppercase(String word) { return isAllUppercase(word, Locale.getDefault()); }  static boolean isInitialUppercase(String word); static boolean isInitialUppercase(String word, Locale locale); static boolean isAllUppercase(String word); static boolean isAllUppercase(String word, Locale locale);  }
@Test public void testIsAllUppercase() throws Exception { assertFalse(CaseUtil.isAllUppercase("Orange", Locale.US)); assertTrue(CaseUtil.isAllUppercase("O", Locale.US)); assertFalse(CaseUtil.isAllUppercase("o", Locale.US)); assertFalse(CaseUtil.isAllUppercase("orange", Locale.US)); assertFalse(CaseUtil.isAllUppercase("Or", Locale.US)); assertTrue(CaseUtil.isAllUppercase("ORANGE", Locale.US)); assertFalse(CaseUtil.isAllUppercase("OrangE", Locale.US)); assertFalse(CaseUtil.isAllUppercase("oRANGE", Locale.US)); assertFalse(CaseUtil.isAllUppercase("1234", Locale.US)); assertTrue(CaseUtil.isAllUppercase("A1234B", Locale.US)); }