public function testSetAggregators()
 {
     $i = new IndexTaskQueryParameters();
     $i->setAggregators(array(array('type' => 'count', 'name' => 'count'), array('type' => 'longSum', 'name' => 'total_referral_count', 'fieldName' => 'referral_count')));
     $this->assertCount(2, $i->aggregators);
     $this->assertJson($i->aggregators[0]);
     $this->assertJson($i->aggregators[1]);
     $this->assertEquals('{"type":"count","name":"count"}', $i->aggregators[0]);
     $this->assertEquals('{"type":"longSum","name":"total_referral_count","fieldName":"referral_count"}', $i->aggregators[1]);
 }
 public function getMockIndexTaskQueryParameters()
 {
     $params = new IndexTaskQueryParameters();
     $params->intervals = new Interval('1981-01-01T4:20', '2012-03-01T3:00');
     $params->granularityType = 'uniform';
     $params->granularity = 'DAY';
     $params->dataSource = $this->mockDataSourceName;
     $params->format = 'json';
     $params->timeDimension = 'date_dim';
     $params->dimensions = array('one_dim', 'two_dim');
     $params->setIntervals('1981-01-01T4:20', '2012-03-01T3:00');
     $params->setFilePath('/another/file/path/to/a/file.bebop');
     $params->setAggregators(array(array('type' => 'count', 'name' => 'count'), array('type' => 'longSum', 'name' => 'total_referral_count', 'fieldName' => 'referral_count')));
     return $params;
 }