### Question:
DefaultHttp2Headers extends DefaultHeaders<CharSequence, CharSequence, Http2Headers> implements Http2Headers { @Override public boolean contains(final CharSequence name, final CharSequence value) { return contains(name, value, false); } DefaultHttp2Headers(); @SuppressWarnings("unchecked")  DefaultHttp2Headers(final boolean validate); @SuppressWarnings("unchecked")  DefaultHttp2Headers(final boolean validate, final int arraySizeHint); @Override Http2Headers clear(); @Override boolean equals(final Object o); @Override int hashCode(); @Override Http2Headers method(final CharSequence value); @Override Http2Headers scheme(final CharSequence value); @Override Http2Headers authority(final CharSequence value); @Override Http2Headers path(final CharSequence value); @Override Http2Headers status(final CharSequence value); @Override CharSequence method(); @Override CharSequence scheme(); @Override CharSequence authority(); @Override CharSequence path(); @Override CharSequence status(); @Override boolean contains(final CharSequence name, final CharSequence value); @Override boolean contains(
      final CharSequence name, final CharSequence value, final boolean caseInsensitive);  }### Answer:
@Test public void testPseudoHeadersWithRemovePreservesPseudoIterationOrder() { final Http2Headers headers = newHeaders(); final Http2Headers nonPseudoHeaders = new DefaultHttp2Headers(); for (final Entry<CharSequence, CharSequence> entry : headers) { if (entry.getKey().length() == 0 || entry.getKey().charAt(0) != ':' && !nonPseudoHeaders.contains(entry.getKey())) { nonPseudoHeaders.add(entry.getKey(), entry.getValue()); } } assertFalse(nonPseudoHeaders.isEmpty()); for (final Entry<CharSequence, CharSequence> nonPseudoHeaderEntry : nonPseudoHeaders) { assertTrue(headers.remove(nonPseudoHeaderEntry.getKey())); verifyPseudoHeadersFirst(headers); verifyAllPseudoHeadersPresent(headers); } for (final Entry<CharSequence, CharSequence> nonPseudoHeaderEntry : nonPseudoHeaders) { headers.add(nonPseudoHeaderEntry.getKey(), of("goo")); verifyPseudoHeadersFirst(headers); verifyAllPseudoHeadersPresent(headers); } }
@Test public void testContainsNameAndValue() { final Http2Headers headers = newHeaders(); assertTrue(headers.contains("name1", "value2")); assertFalse(headers.contains("name1", "Value2")); assertTrue(headers.contains("2name", "Value3", true)); assertFalse(headers.contains("2name", "Value3", false)); }