<commit_before>package org.http4s

import org.scalatest.{WordSpec, Matchers}

class HeaderCollectionSpec extends WordSpec with Matchers {
  "put" should {
    "replace duplicate headers" in {
      val headers = HeaderCollection(
        Headers.SetCookie(Cookie("foo", "bar")),
        Headers.SetCookie(Cookie("baz", "quux"))
      )
      headers.getAll(Headers.SetCookie) should have length (2)
      headers.put(Headers.SetCookie(Cookie("piff", "paff"))).getAll(Headers.SetCookie) should be (Seq(
        Headers.SetCookie(Cookie("piff", "paff"))
      ))
    }
  }
}<commit_msg>Failing test: raw header mixed with parsed header.<commit_after>package org.http4s

import org.scalatest.{WordSpec, Matchers}

class HeaderCollectionSpec extends WordSpec with Matchers {
  "put" should {
    "replace duplicate headers" in {
      val headers = HeaderCollection(
        Headers.SetCookie(Cookie("foo", "bar")),
        Headers.SetCookie(Cookie("baz", "quux"))
      )
      headers.getAll(Headers.SetCookie) should have length (2)
      headers.put(Headers.SetCookie(Cookie("piff", "paff"))).getAll(Headers.SetCookie) should be (Seq(
        Headers.SetCookie(Cookie("piff", "paff"))
      ))
    }
  }

  "getAll by header key" should {
    "find raw headers of the same type" in {
      val headers = HeaderCollection(
        Headers.SetCookie(Cookie("foo", "bar")),
        Headers.RawHeader("Set-Cookie", Cookie("baz", "quux").toString)
      )
      headers.getAll(Headers.SetCookie) should have length (2)
    }
  }
}
{'fraction_non_alphanumeric': 0.13442622950819672, 'fraction_numerical': 0.003278688524590164, 'mean_word_length': 3.461988304093567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3747097', 'n_tokens_mistral': 476, 'n_tokens_neox': 461, 'n_words': 105}