/**
  * Test related methods
  */
 public function testGuessUpdates()
 {
     $attribute = new Attribute();
     $group = new AttributeGroup();
     $attribute->setGroup($group);
     $guesser = new AttributeGroupUpdateGuesser();
     $em = $this->getEntityManagerMock($group);
     $em->expects($this->any())->method('getUnitOfWork')->will($this->returnValue($this->getUnitOfWorkMock($group)));
     $updates = $guesser->guessUpdates($em, $attribute, UpdateGuesserInterface::ACTION_UPDATE_ENTITY);
     $this->assertEquals(2, count($updates));
     $this->assertEquals($attribute, $updates[0]);
     $this->assertEquals($group, $updates[1]);
 }
 /**
  * {@inheritDoc}
  */
 public function setGroup(\Pim\Bundle\CatalogBundle\Model\AttributeGroupInterface $group = NULL)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setGroup', array($group));
     return parent::setGroup($group);
 }