private function initManager(array $schedules)
 {
     $this->manager->expects($this->any())->method('findSchedules')->will($this->returnCallback(function ($limit = null, $offset = null) use($schedules) {
         return array_slice($schedules, $offset, $limit);
     }));
 }
 /**
  * Fill the inner buffer
  */
 protected function buffer()
 {
     $this->buffer = $this->scheduleManager->findSchedules($this->limit, $this->offset);
     $this->offset += count($this->buffer);
 }