|
10 | 10 | import org.jsoup.helper.W3CDom; |
11 | 11 | import org.jsoup.integration.servlets.*; |
12 | 12 | import org.jsoup.internal.SharedConstants; |
13 | | -import org.jsoup.internal.StringUtil; |
14 | 13 | import org.jsoup.nodes.Document; |
15 | 14 | import org.jsoup.nodes.Element; |
16 | 15 | import org.jsoup.nodes.FormElement; |
|
22 | 21 | import org.jsoup.parser.XmlTreeBuilder; |
23 | 22 | import org.junit.jupiter.api.BeforeAll; |
24 | 23 | import org.junit.jupiter.api.BeforeEach; |
25 | | -import org.junit.jupiter.api.Disabled; |
26 | 24 | import org.junit.jupiter.api.Test; |
27 | 25 | import org.junit.jupiter.params.ParameterizedTest; |
28 | 26 | import org.junit.jupiter.params.provider.MethodSource; |
|
41 | 39 | import java.nio.charset.StandardCharsets; |
42 | 40 | import java.nio.file.Files; |
43 | 41 | import java.nio.file.Path; |
44 | | -import java.util.Collection; |
45 | | -import java.util.LinkedHashMap; |
46 | 42 | import java.util.List; |
47 | 43 | import java.util.Map; |
48 | | -import java.util.Set; |
49 | 44 | import java.util.concurrent.atomic.AtomicBoolean; |
50 | 45 | import java.util.concurrent.atomic.AtomicInteger; |
51 | 46 | import java.util.stream.Stream; |
@@ -769,21 +764,6 @@ public void combinesSameHeadersWithComma() throws IOException { |
769 | 764 | assertEquals("no-store", header.get(1)); |
770 | 765 | } |
771 | 766 |
|
772 | | - @Test void responseHeadersPreserveInsertOrder() throws IOException { |
773 | | - // linkedhashmap preserves the response header order |
774 | | - Connection con = Jsoup.connect(echoUrl); |
775 | | - con.get(); |
776 | | - Connection.Response res = con.response(); |
777 | | - Map<String, String> headers = res.headers(); |
778 | | - assertInstanceOf(LinkedHashMap.class, headers); |
779 | | - assertEquals(5, headers.size()); |
780 | | - String[] expected = {"Date", "Content-Type", "Cache-Control", "Content-Length", "Server"}; |
781 | | - int i = 0; |
782 | | - for (String key : headers.keySet()) { |
783 | | - assertEquals(expected[i++], key); |
784 | | - } |
785 | | - } |
786 | | - |
787 | 767 | @Test |
788 | 768 | public void sendHeadRequest() throws IOException { |
789 | 769 | String url = FileServlet.urlTo("/htmltests/xml-test.xml"); |
|
0 commit comments