/**
  * @test
  */
 public function dateTimeIsPersistedAndIsReconstituted()
 {
     $dateTimeTz = new \DateTime('2008-11-16 19:03:30', new \DateTimeZone(ini_get('date.timezone')));
     $extendedTypesEntity = new ExtendedTypesEntity();
     $extendedTypesEntity->setDateTime($dateTimeTz);
     $this->persistenceManager->add($extendedTypesEntity);
     $this->persistenceManager->persistAll();
     $this->persistenceManager->clearState();
     /**  @var ExtendedTypesEntity $persistedExtendedTypesEntity */
     $persistedExtendedTypesEntity = $this->extendedTypesEntityRepository->findAll()->getFirst();
     $this->assertInstanceOf(\TYPO3\Flow\Tests\Functional\Persistence\Fixtures\ExtendedTypesEntity::class, $persistedExtendedTypesEntity);
     $this->assertInstanceOf(\DateTime::class, $persistedExtendedTypesEntity->getDateTime());
     $this->assertEquals($dateTimeTz->getTimestamp(), $persistedExtendedTypesEntity->getDateTime()->getTimestamp());
     $this->assertEquals(ini_get('date.timezone'), $persistedExtendedTypesEntity->getDateTime()->getTimezone()->getName());
 }