    @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);
        }
    }