@Test
public void test_download_set_charset() throws Exception {

    HttpServer server = httpServer(13423);
    server.response(header("Content-Type","text/html; charset=utf-8")).response("hello world!");
    Runner.running(server, new Runnable() {
        @Override
        public void run() throws Exception {
            final HttpClientDownloader httpClientDownloader = new HttpClientDownloader();
            Request request = new Request();
            request.setUrl("http://127.0.0.1:13423/");
            Page page = httpClientDownloader.download(request, Site.me().toTask());
            assertThat(page.getCharset()).isEqualTo("utf-8");
        }
    });
}