public List<String> toList() {
        List<String> list = new ArrayList<>(header.size() * 2);
        Iterator<Map.Entry<String, String>> iterator = iterator();
        while (iterator.hasNext()) {
            Map.Entry<String, String> entry = iterator.next();
            list.add(entry.getKey());
            list.add(entry.getValue());
        }
        return list;
    }
@Test
    void testToList() {
        Header header = Header.newInstance();
        List<String> list = header.toList();
        assertTrue(list.contains(HttpHeaderConsts.CONTENT_TYPE));
        assertTrue(list.contains(MediaType.APPLICATION_JSON));
        assertEquals(1, list.indexOf(MediaType.APPLICATION_JSON) - list.indexOf(HttpHeaderConsts.CONTENT_TYPE));
        assertTrue(list.contains(HttpHeaderConsts.ACCEPT_CHARSET));
        assertTrue(list.contains("UTF-8"));
        assertEquals(1, list.indexOf("UTF-8") - list.indexOf(HttpHeaderConsts.ACCEPT_CHARSET));
    }