/**
  * Check that a delayed task can be added to the queue correctly and peeked at
  * 
  * @return void
  * 
  * @test
  */
 public function testGetDelayedTask()
 {
     //get the task
     $_task = $this->_getTask();
     $_task->setDelay(5);
     //add and then retrieve the task
     $this->_queue->addTask($_task);
     $_task2 = $this->_queue->getNextUnreservedDelayedTask();
     //check they're the same data - this is not infallible, as there could be an
     //extant job in the queue that matches, but i can't think of a better way to
     //check this
     $this->assertEquals($_task->getTask(), $_task2->getTask(), 'Check that the task is in the queue');
     //make sure the data set was the same
     $this->assertEquals($_task->getTest(), $_task2->getTest(), 'Check that tasks have the same data');
     //make sure that this task is reserved
     $this->assertEquals(Lilmuckers_Queue_Model_Queue_Task_State::DELAYED, $_task2->getInfo(true)->getState(), 'Check that the reserved task is delayed');
     //kick the delayed tasks
     $this->_adapter->unholdMultiple(10);
     //delete the task that was set
     $this->_queue->remove($_task2);
 }