public function administratorsCanSeeTestEntityAAssociatedToATestEntityBWithValueAdmin()
{
$this->authenticateRoles(['Neos.Flow:Administrator']);
$testEntityB = new Fixtures\TestEntityB('Admin');
$testEntityA = new Fixtures\TestEntityA($testEntityB);
$testEntityB2 = new Fixtures\TestEntityB('NoAdmin');
$testEntityA2 = new Fixtures\TestEntityA($testEntityB2);
$this->testEntityADoctrineRepository->add($testEntityA);
$this->testEntityADoctrineRepository->add($testEntityA2);
$testEntityAIdentifier = $this->persistenceManager->getIdentifierByObject($testEntityA);
$testEntityA2Identifier = $this->persistenceManager->getIdentifierByObject($testEntityA2);
$this->persistenceManager->persistAll();
$this->persistenceManager->clearState();
$result = $this->testEntityADoctrineRepository->findAllWithDql();
$this->assertTrue(count($result) === 2);
$this->assertNotNull($this->persistenceManager->getObjectByIdentifier($testEntityAIdentifier, Fixtures\TestEntityA::class));
$this->assertNotNull($this->persistenceManager->getObjectByIdentifier($testEntityA2Identifier, Fixtures\TestEntityA::class));
$this->restrictableEntityDoctrineRepository->removeAll();
$this->persistenceManager->persistAll();
$this->persistenceManager->clearState();
}