         res.should.to.be.deep.equal response
         done()
 
+    # SORT PARAMS
     it 'search with type and query', (done) ->
       response =
         field: "value"


    it 'sanitizeQuery', ->
      # checks if words are longer than 55 chars and the whole query is longer than 255 chars
      client = new doofinder.Client mock.request.hashid, mock.request.api_keys
      # checks valid query
      query = "hello world"
      sanitized = client._sanitizeQuery query, (query) -> return query

        res.should.to.be.deep.equal response
        done()

    # FILTER PARAMS
    it 'search with type query and filters', (done) ->
      response =
        field: "value"
      scope = nock('http://fooserver')
        .get('/5/search?hashid=ffffffffffffffffffffffffffffffff&type=product&page=1&rpp=10&query=querystring&filter%5Bcolor%5D=blue&filter%5Bcolor%5D=red&filter%5Bprice%5D%5Bgte%5D=4.36&filter%5Bprice%5D%5Blt%5D=99')
        .reply(200, response)
      client = new doofinder.Client mock.request.hashid, mock.request.api_key, 5, 'product', 'fooserver'
      client.search 'querystring', {filters: mock.filters}, (err, res) ->
        res.should.to.be.deep.equal response
        done()

    it 'hit', (done) ->
      response =
        field: "value"
      scope = nock('http://fooserver')
        .filteringPath(/random=[^&]*/g, 'random=XXX')
        .get('/5/hit/ffffffffffffffffffffffffffffffff/666/querystring?random=XXX')
        .reply(200, response)
      client = new doofinder.Client mock.request.hashid, mock.request.api_key, 5, 'product', 'fooserver'
      client.hit 666, 'querystring', (err, res) ->
        res.should.to.be.deep.equal response
        done()

    it 'hit', (done) ->
      response =
        field: "value"
      scope = nock('http://fooserver')
        .get('/5/options/ffffffffffffffffffffffffffffffff')
        .reply(200, response)
      client = new doofinder.Client mock.request.hashid, mock.request.api_key, 5, 'product', 'fooserver'
      client.options (err, res) ->
        res.should.to.be.deep.equal response
        done()

    it 'options', ->
      a = 1
