/**
  * @dataProvider listProvider
  */
 public function testGetFlatArrayIndexOfObject(array $objects)
 {
     $indexedArray = new ByPropertyIdArray($objects);
     $indexedArray->buildIndex();
     $indicesSource = array();
     $indicesDestination = array();
     $i = 0;
     foreach ($objects as $object) {
         $indicesSource[$i++] = $object;
         $indicesDestination[$indexedArray->getFlatArrayIndexOfObject($object)] = $object;
     }
     $this->assertEquals($indicesSource, $indicesDestination);
 }