code: private static void toHttp2HeadersFilterTE(Entry<CharSequence, CharSequence> entry,
                                                 Http2Headers out) {
          if (indexOf(entry.getValue(), ',', 0) == -1) {
              if (contentEqualsIgnoreCase(trim(entry.getValue()), TRAILERS)) {
                  out.add(TE, TRAILERS);
              }
          } else {
              List<CharSequence> teValues = unescapeCsvFields(entry.getValue());
              for (CharSequence teValue : teValues) {
                  if (contentEqualsIgnoreCase(trim(teValue), TRAILERS)) {
                      out.add(TE, TRAILERS);
                      break;
                  }
              }
          }
      }
docs: Filter the {@link HttpHeaderNames#TE} header according to the
  <a href="https://tools.ietf.org/html/rfc7540#section-8.1.2.2">special rules in the HTTP/2 RFC</a>.
  @param entry An entry whose name is {@link HttpHeaderNames#TE}.
  @param out the resulting HTTP/2 headers.