public function testCreateEntityCollection()
 {
     $data = array(array('id' => 123, 'beanName' => 'Group'), array('id' => 456, 'beanName' => 'Group'));
     $entityMappings = array('Group' => 'InoPerunApi\\Entity\\Group');
     $collectionMappings = array('Group' => 'InoPerunApi\\Entity\\Collection\\GroupCollection');
     $this->factory->setBeanToEntityClassMappings($entityMappings);
     $this->factory->setBeanToCollectionClassMappings($collectionMappings);
     $collection = $this->factory->createEntityCollection($data);
     $this->assertInstanceOf('InoPerunApi\\Entity\\Collection\\GroupCollection', $collection);
     $this->assertSame(count($data), $collection->count());
     foreach ($collection as $entity) {
         $this->assertInstanceOf('InoPerunApi\\Entity\\Group', $entity);
     }
 }