StringUtil { public static boolean isEmpty( final String str ) { return ( str == null ) || ( str.length() == 0 ); } private  StringUtil(); static String[] tokenStringToArray( final String tokenizedString, final String token ); static boolean doesPathContainParentPathSegment( final String path ); static void main( final String[] args ); static boolean isEmpty( final String str ); static String getMapAsPrettyString( final Map map ); static Map<String, String> trimStringMap( Map<String, String> map ); static List<String> trimStringList( List<String> list ); static String trimToEmpty( String string );  }
@Test public void testIsEmpty() { Assert.assertTrue( StringUtil.isEmpty( null ) ); Assert.assertTrue( StringUtil.isEmpty( "" ) ); Assert.assertFalse( StringUtil.isEmpty( " " ) ); Assert.assertFalse( StringUtil.isEmpty( "foo" ) ); }