DefaultHttp2Headers extends DefaultHeaders<CharSequence, CharSequence, Http2Headers> implements Http2Headers { @Override public Http2Headers authority(CharSequence value) { set(PseudoHeaderName.AUTHORITY.value(), value); return this; } DefaultHttp2Headers(); @SuppressWarnings("unchecked")  DefaultHttp2Headers(boolean validate); @SuppressWarnings("unchecked")  DefaultHttp2Headers(boolean validate, int arraySizeHint); @Override Http2Headers clear(); @Override boolean equals(Object o); @Override int hashCode(); @Override Http2Headers method(CharSequence value); @Override Http2Headers scheme(CharSequence value); @Override Http2Headers authority(CharSequence value); @Override Http2Headers path(CharSequence value); @Override Http2Headers status(CharSequence value); @Override CharSequence method(); @Override CharSequence scheme(); @Override CharSequence authority(); @Override CharSequence path(); @Override CharSequence status();  }
@Test public void testSetHeadersOrdersPsuedoHeadersCorrectly() { Http2Headers headers = newHeaders(); Http2Headers other = new DefaultHttp2Headers().add("name2", "value2").authority("foo"); headers.set(other); verifyPseudoHeadersFirst(headers); assertEquals(other.size(), headers.size()); assertEquals("foo", headers.authority()); assertEquals("value2", headers.get("name2")); }
@Test public void testSetAllOrdersPsuedoHeadersCorrectly() { Http2Headers headers = newHeaders(); Http2Headers other = new DefaultHttp2Headers().add("name2", "value2").authority("foo"); int headersSizeBefore = headers.size(); headers.setAll(other); verifyPseudoHeadersFirst(headers); verifyAllPseudoHeadersPresent(headers); assertEquals(headersSizeBefore + 1, headers.size()); assertEquals("foo", headers.authority()); assertEquals("value2", headers.get("name2")); }