StringUtil { public static boolean isEmpty(CharSequence theString) { return theString.length() == 0; }  static boolean isWhitespace(char charCode); static boolean isWhitespace(int charCode); static String toLowerCase(CharSequence string); static String toUpperCase(CharSequence string); static boolean isEmpty(CharSequence theString);  }
@Test public void testIsEmpty() { assertTrue(StringUtil.isEmpty("")); assertTrue(!StringUtil.isEmpty("a")); }
@Test(expected=NullPointerException.class) public void testIsEmptyWithNullString() { StringUtil.isEmpty(null); }