Strings { public static boolean isNullOrEmptyString(final String value) { return value == null || value.trim().length() == 0; }  static boolean isNotNullOrEmptyString(final String value); static boolean isNullOrEmptyString(final String value); static int asInt(final String value, final int defaultValue); static final String EMPTY_STRING; }
@Test public void isNullOrEmptyString() { for (final String empty : EMPTY_STRINGS) { assertTrue(Strings.isNullOrEmptyString(empty)); } for (final String empty : NOT_EMPTY_STRINGS) { assertFalse(Strings.isNullOrEmptyString(empty)); } }