public function testInvokeGet()
 {
     $entity = new State("Foo");
     $element = new State("Bar");
     $persister = $this->createPersisterDefault();
     $collection = $this->createCollection($entity);
     $this->em->getUnitOfWork()->registerManaged($entity, array('id' => 1), array('id' => 1, 'name' => 'Foo'));
     $this->collectionPersister->expects($this->once())->method('get')->with($this->equalTo($collection), $this->equalTo(0))->will($this->returnValue($element));
     $this->assertEquals($element, $persister->get($collection, 0));
 }
 /**
  * {@inheritDoc}
  */
 public function loadCriteria(PersistentCollection $collection, Criteria $criteria)
 {
     return $this->persister->loadCriteria($collection, $criteria);
 }