/**
  * Add subquery to boolean query.
  *
  * @param QueryBoolean $query
  * @param array $options
  * @return QueryBoolean
  * @throws \RuntimeException
  */
 protected function addSubquery($query, array $options)
 {
     list($value, $sign) = $this->queryBuilder->build($options);
     $query->addSubquery($this->queryBuilder->parse($value), $sign);
     return $query;
 }
 /**
  * @dataProvider getBuildDataProvider
  */
 public function testBuild($expected, $options)
 {
     $actual = $this->builder->build($options);
     $this->assertEquals($expected[0], $actual[0]);
     $this->assertTrue($expected[1] === $actual[1]);
 }