StringUtil { public static boolean isValid(@Nullable String value) { return !TextUtils.isEmpty(value) && !value.equalsIgnoreCase("null"); }  static boolean isNullOrEmpty(@Nullable String s); @NonNull static String controlToSpace(@Nullable String val); static boolean isValid(@Nullable String value); static final char SPACE_CHAR; }
@Test public void isValid_ShouldReturnFalseIfNull() { boolean result = StringUtil.isValid(null); assertFalse(result); }
@Test public void isValid_ShouldReturnFalseIfEmpty() { boolean result = StringUtil.isValid(""); assertFalse(result); }
@Test public void isValid_ShouldReturnFalseIfNullString() { boolean result = StringUtil.isValid("null"); assertFalse(result); }
@Test public void isValid_ShouldReturnTrueIfValid() { boolean result = StringUtil.isValid("value"); assertTrue(result); }