### Question:
HtmlUtils { public static String getHtmlCharset(byte[] htmlContent) { String charset = Charset.defaultCharset().name(); return getHtmlCharset(htmlContent, charset); }  static String getHtmlCharset(byte[] htmlContent); static String getHtmlCharset(byte[] htmlContent, String defaultCharset); static String getHeadStr(String html);  }### Answer:
@Test public void testGetCharset() throws UnsupportedEncodingException { for (String currentCharset : charsets) { String html = "<html><meta charset=\"" + currentCharset + "\"/><body></body></html>"; String charset = HtmlUtils.getHtmlCharset(html.getBytes(currentCharset)); Assert.assertEquals(currentCharset, charset); } }