public function addDelegatesToPersistenceManager()
{
$object = new \stdClass();
$mockPersistenceManager = $this->createMock(Persistence\PersistenceManagerInterface::class);
$mockPersistenceManager->expects($this->once())->method('add')->with($object);
$repository = $this->getAccessibleMock(Persistence\Repository::class, ['dummy']);
$this->inject($repository, 'persistenceManager', $mockPersistenceManager);
$repository->_set('entityClassName', get_class($object));
$repository->add($object);
}