e5Tests :: TestTree
e5Tests = decisionTestGroup "e5" "Accept-Charset exists?"
  [ testCase "True ==> e6" $
      let rq = req { reqHeaders = HashMap.singleton hAcceptCharset ["utf-8"] }
      in after' e5 resource rq @?= Decision' "e6"
  , testCase "False + no charsets provided ==> f6 w/o charset" $
      afterCharset e5 resource req @?= (Decision' "f6", Nothing)
  , testCase "False + charset provided ==> f6 + charset" $
      let r = resource { charsetsProvided = provideCharsets $ return ("utf-8", id) }
      in afterCharset e5 r req @?= (Decision' "f6", Just "utf-8")
  ]
e5Tests :: TestTree
e5Tests = decisionTestGroup "e5" "Accept-Charset exists?"
  [ testCase "True ==> e6" $
      let rq = req { reqHeaders = HashMap.singleton hAcceptCharset ["utf-8"] }
      in after' e5 resource rq @?= Decision' "e6"
  , testCase "False + no charsets provided ==> f6 w/o charset" $
      afterCharset e5 resource req @?= (Decision' "f6", Nothing)
  , testCase "False + charset provided ==> f6 + charset" $
      let r = resource { charsetsProvided = provideCharsets $ return ("utf-8", id) }
      in afterCharset e5 r req @?= (Decision' "f6", Just "utf-8")
  ]
e5Tests = decisionTestGroup "e5" "Accept-Charset exists?"
  [ testCase "True ==> e6" $
      let rq = req { reqHeaders = HashMap.singleton hAcceptCharset ["utf-8"] }
      in after' e5 resource rq @?= Decision' "e6"
  , testCase "False + no charsets provided ==> f6 w/o charset" $
      afterCharset e5 resource req @?= (Decision' "f6", Nothing)
  , testCase "False + charset provided ==> f6 + charset" $
      let r = resource { charsetsProvided = provideCharsets $ return ("utf-8", id) }
      in afterCharset e5 r req @?= (Decision' "f6", Just "utf-8")
  ]