### Question:
CharsetUtils { public static String toUTF8String(final byte[] bs) { try { return bs == null || bs.length == 0 ? "" : new String(bs, "utf-8"); } catch (UnsupportedEncodingException e) { return ""; } }  static byte[] toUTF8Bytes(final String s); static String toUTF8String(final byte[] bs); static final Charset UTF8; }### Answer:
@Test public void testToUTF8String() { Assert.assertEquals("", CharsetUtils.toUTF8String(null)); Assert.assertEquals("", CharsetUtils.toUTF8String(new byte[0])); Assert.assertEquals("foo", CharsetUtils.toUTF8String(new byte[]{102, 111, 111})); }