CharSequenceUtils { public static String toStringWithNullToEmpty(CharSequence value) { return value == null? "": value.toString(); } private  CharSequenceUtils(); static String toStringWithNullToEmpty(CharSequence value);  }
@Test public void toStringWithNullToEmpty() { StringBuilder sb = new StringBuilder(); sb.append("MMMM"); assertEquals("MMMM", CharSequenceUtils.toStringWithNullToEmpty(sb)); }
@Test public void toStringWithNullToEmpty_NULL() { assertEquals("", CharSequenceUtils.toStringWithNullToEmpty(null)); }