Strings { public static boolean isNullOrEmpty(final Object value) { if (value == null) { return true; } final String s = value.toString(); return s == null || s.isEmpty(); } private  Strings(); static boolean isNullOrEmpty(final Object value);  }
@Test public void testNull() { assertTrue(Strings.isNullOrEmpty(null)); }
@Test public void testEmpty() { assertTrue(Strings.isNullOrEmpty("")); }
@Test public void testNonEmpty() { assertFalse(Strings.isNullOrEmpty("foo")); }
@Test public void testNonEmptyNonString() { assertFalse(Strings.isNullOrEmpty(new Mock("foo"))); }
@Test public void testEmptyNonString() { assertTrue(Strings.isNullOrEmpty(new Mock(""))); }
@Test public void testNullNonString() { assertTrue(Strings.isNullOrEmpty(new Mock(null))); }