public function testOperations()
 {
     $op = new FilterOperation('id', '<=', 3);
     $this->operations->add($op);
     self::assertEquals(3, $this->service->count(), 'Test filtering');
     $this->operations->remove($op);
     self::assertEquals($this->totalCount, $this->service->count(), 'Test recalc. after removing operation');
 }
 /**
  * @param mixed $data
  * @return mixed
  */
 protected function applyOperations($data)
 {
     foreach ($this->operations->toArray() as $operation) {
         $processor = $this->processorResolver->getProcessor($operation);
         $data = $processor->process($data, $operation);
     }
     return $data;
 }