/**
  * [findDemanded description]
  *
  * @param \Frappant\FrpExample\Domain\Model\Dto\ItemDemand $itemDemand [description]
  * @return [type]                                                       [description]
  */
 public function findDemanded(\Frappant\FrpExample\Domain\Model\Dto\ItemDemand $itemDemand)
 {
     /** @var TYPO3\CMS\Extbase\Persistence\Generic\Query $query */
     $query = $this->createQuery();
     // $querySettings = $query->getQuerySettings();
     $constraints = array();
     if ($itemDemand->getTitle()) {
         $constraints[] = $this->createTitleConstraint($query, $itemDemand->getTitle());
     }
     // if ($itemDemand->getGroup()){
     // 	$constraints[] = $query->contains('groups', $itemDemand->getGroup());
     // }
     if (!empty($constraints)) {
         $query->matching($query->logicalAnd($constraints));
     }
     if ($itemDemand->getLimit()) {
         $query->setLimit($itemDemand->getLimit());
     }
     return $query->execute();
 }
 /**
  * @test
  */
 public function getLimitReturnsInitialValueForString()
 {
     $this->assertSame(0, $this->subject->getLimit());
 }