anchor.diff:      Assert.Equal(Some "text/plain", matchMediaType "text/plain" "*/*")
   
   [<Fact>]
  -let ``Filter and sort media``() =
  +let ``Negotiate media type``() =
       let accept = "application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" // actual Chrome Accepts header
       let serves = ["application/xml"; "text/xml"; "text/html"; "application/json"]
       let sorted = negotiateMediaType serves accept
       Assert.Equal(["application/xml",1.; "text/html",0.9; "text/xml",0.4998; "application/json",0.4998], sorted)
   
   [<Fact>]
  -let ``Filter and sort media 2``() =
  +let ``Negotiate media type 2``() =
       let accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" // actual Firefox Accepts header
       let serves = ["text/html"; "application/json"; "application/xml"; "text/xml"]
       let sorted = negotiateMediaType serves accept
  
positive.code:     | x -> failwithf "wrong parsing: %A" x
  
  [<Fact>]
  let ``Content type matching``() =
      let accept = "text/html; q=0.8; level=2, text/html; q=0.2; level=1, image/png, image/jpeg;q=0.8"
      let images = accept |> filterMediaTypes "image"
      match images with
  
negative.code:     Assert.Equal(None, matchLanguage "en" "en-ca")
  
  [<Fact>]
  let ``Negotiate languages``() =
      let accept = "da, en-gb;q=0.8, en;q=0.7"
      let serves = ["en-us"]
      let sorted = negotiateLanguage serves accept
      Assert.Equal(["en-us",0.7], sorted)
  
  [<Fact>]
  let ``Negotiate charset with implicit iso-8859-1``() =
      let accept = "iso-8859-5, unicode-1-1;q=0.8"
      let serves = ["iso-8859-1"]
      let sorted = negotiateCharset serves accept
      Assert.Equal(["iso-8859-1",1.], sorted)
  
  [<Fact>]
  let ``Negotiate charset with implicit iso-8859-1 in wildcard with q``() =
      let accept = "iso-8859-5, unicode-1-1;q=0.8, *;q=0.7"
      let serves = ["iso-8859-1"; "unicode-1-1"]
      let sorted = negotiateCharset serves accept
      Assert.Equal(["unicode-1-1",0.8; "iso-8859-1",0.6999], sorted)
  
  [<Fact>]
  let ``Negotiate charset with implicit iso-8859-1 in wildcard with q=0``() =
      let accept = "iso-8859-5, unicode-1-1;q=0.8, *;q=0"
      let serves = ["iso-8859-1"; "unicode-1-1"]
      let sorted = negotiateCharset serves accept
      Assert.Equal(["unicode-1-1",0.8], sorted)
  
  [<Fact>]
  let ``Negotiate charset with explicit iso-8859-1 and wildcard with q``() =
      let accept = "iso-8859-5, iso-8859-1;q=0.9, unicode-1-1;q=0.8, *;q=0.7"
      let serves = ["iso-8859-1"; "unicode-1-1"]
      let sorted = negotiateCharset serves accept
      Assert.Equal(["iso-8859-1",0.9; "unicode-1-1",0.8], sorted)
  
  [<Fact>]
  let ``Negotiate charset with empty accept``() =
      let accept: string = null
      let serves = ["iso-8859-1"; "unicode-1-1"]
      let sorted = negotiateCharset serves accept
  