public function testParseResponse()
 {
     $searcher = new Searcher();
     $data = array('hits' => array('total' => 100, 'hits' => array(array('_score' => 5, '_id' => 1), array('_score' => 2, '_id' => 10), array('_score' => 3, '_id' => 100))), 'facets' => array('name1' => array('terms' => array(array('term' => 'term1', 'count' => 10), array('term' => 'term2', 'count' => 15))), 'range1' => array('ranges' => array(array('from' => 0, 'to' => 10, 'count' => 15), array('from' => 10, 'to' => 20, 'count' => 20)))));
     $response = new \Elastica\Response(json_encode($data));
     $results = new \Elastica\ResultSet($response, new \Elastica\Query());
     $output = $searcher->_parseResults($results);
     $this->assertEquals(array('total' => 100, 'facets' => array('name1' => array('term1' => 10, 'term2' => 15), 'range1' => array('0-10' => 15, '10-20' => 20)), 'ids' => array(1, 10, 100)), $output);
 }