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