/**
  * @dataProvider instanceProvider
  * @param ReferenceList $array
  */
 public function testHasReferenceBeforeRemoveButNotAfter(ReferenceList $array)
 {
     if ($array->count() === 0) {
         $this->assertTrue(true);
         return;
     }
     /**
      * @var Reference $hashable
      */
     foreach (iterator_to_array($array) as $hashable) {
         $this->assertTrue($array->hasReference($hashable));
         $array->removeReference($hashable);
         $this->assertFalse($array->hasReference($hashable));
     }
 }