public function testQuery()
{
$upper_bound = static::$now->getTimestamp() + 1;
$lower_bound = static::oneHourAgo() - 1;
$response = (new Command\Builder\TimeSeries\Query(static::$riak))->withQuery("select * from " . static::$table . " where region = 'South Atlantic' and state = 'South Carolina' and (time > {$lower_bound} and time < {$upper_bound})")->build()->execute();
$this->assertEquals('200', $response->getCode(), $response->getMessage());
$this->assertCount(2, $response->getResults());
$this->assertCount(7, $response->getResult());
if (static::$riak->getApi() instanceof Riak\Api\Pb) {
$this->assertEquals('South Atlantic', $response->getResults()[0][0]->getValue());
} else {
$this->assertEquals('South Atlantic', $response->getResult()['region']);
}
}