/**
  * @group EricssonCommercialGroupInt
  */
 public function testFindAll()
 {
     $this->commercialGroupMapper->insert($this->commercialGroup);
     $this->assertNotNull($this->commercialGroup->getId());
     $commercialGroups = $this->commercialGroupMapper->findAll();
     $this->assertNotNull($commercialGroups);
     $this->assertGreaterThanOrEqual(1, $commercialGroups->getCount());
     $items = $commercialGroups->getItems();
     foreach ($items as $item) {
         $this->assertInstanceOf('\\Application\\Model\\CommercialGroupModel', $item);
     }
 }
 public function testUpdateAuthorizedAndRestrictedNumbers()
 {
     $this->commercialGroupMapper->insert($this->commercialGroup);
     $this->assertNotNull($this->commercialGroup->getId());
     $commGroup = $this->commercialGroupMapper->findOneById($this->commercialGroup->getId());
     $whiteList = $commGroup->getWhiteList();
     $whiteList[] = "984847766";
     $commGroup->setWhiteList($whiteList);
     $blackList = $commGroup->getBlackList();
     $blackList[] = "888474632";
     $commGroup->setBlackList($whiteList);
     $result = $this->commercialGroupMapper->update($commGroup);
     $this->assertNotNull($result);
     $this->assertEquals($this->commercialGroup->getId(), $result);
 }