'When the endpoint being documented references an example HTTP session
that session is included in the generated API documentation, marked up
as HTTP.'

def test_example(self):

    app = Klein()
    @app.route('/', methods=['GET'])
    @user_documentation(u'\n                                                Demonstrates    examples.\n                                                ', examples=[u'example-example'], header=u'Header', section=u'section')
    def dummy_g():
        pass
    examples = {u'example-example': {u'id': u'example-example', u'doc': u'This    example    demonstrates    examples.', u'request': u'GET    /prefix/    HTTP/1.1\n\n', u'response': u'HTTP/1.1    200    OK\n\n"%(DOMAIN)s"\n'}}
    rest = list(makeRst('/prefix', 'section', app, examples.get, {}))
    self.assertEqual([u'Header', u'------', u'', u'', '..    http:get::    /prefix/', '', '            Demonstrates    examples.', '            ', '            **Example:**    This    example    demonstrates    examples.', '            ', '            Request', '            ', '            ..    sourcecode::    http', '            ', '                        GET    /prefix/    HTTP/1.1', '                        Host:    api.example.com', '                        Content-Type:    application/json', '                        ', '            ', '            Response', '            ', '            ..    sourcecode::    http', '            ', '                        HTTP/1.1    200    OK', '                        Content-Type:    application/json', '                        ', '                        "example.com"', '            ', ''], rest)
