StringUtils { public static boolean isEmpty(String str) { return (str == null) || ("".equals(str)); }  static String generateRandom(int length); static boolean isEmpty(String str);  }
@Test public void utilShouldReturnTrueWhenStringIsNull() { boolean result = StringUtils.isEmpty(null); assertThat(result, is(Boolean.valueOf(true))); }
@Test public void utilShouldReturnTrueWhenStringIsEmpty() { boolean result = StringUtils.isEmpty(""); assertThat(result, is(Boolean.valueOf(true))); }
@Test public void utilShouldReturnFalseWhenStringIsNotEmpty() { String notEmpty = "String notEmpty"; boolean result = StringUtils.isEmpty(notEmpty); assertThat(result, is(Boolean.valueOf(false))); }