public function testNewWithEntityCollection()
 {
     $org = new Organisation();
     $org->setCn('test');
     $org->addMember($this->em->getRepository('\\OpenLdapObject\\Tests\\Manager\\People')->find('pdeparis'));
     $this->em->persist($org);
     $this->em->flush();
     $this->em->remove($org);
     $this->em->flush();
 }
 /**
  * @expectedException OpenLdapObject\Exception\InvalidEntityException
  */
 public function testAddBadEntity()
 {
     $org = new Organisation();
     $org->setCn('test');
     $org->addMember($this->em->getRepository('\\OpenLdapObject\\Tests\\Manager\\Organisation')->find('state'));
 }