/**
  * @param string|EntityId $id
  * @param bool $resolveRedirects
  *
  * @return null|EntityDocument
  */
 public function getEntity($id, $resolveRedirects = false)
 {
     if (is_string($id)) {
         $id = $this->idParser->parse($id);
     }
     if ($resolveRedirects) {
         return $this->redirectResolvingEntityLookup->getEntity($id);
     } else {
         return $this->mockRepository->getEntity($id);
     }
 }
 /**
  * @dataProvider hasEntityProvider
  */
 public function testHasEntity(EntityId $id, $exists)
 {
     $lookup = new RedirectResolvingEntityLookup($this->getLookupDouble());
     $this->assertEquals($exists, $lookup->hasEntity($id));
 }