public function moreComplexQueryCanBeExecutedAfterDeserialization()
{
$testEntityRepository = new Fixtures\TestEntityRepository();
$testEntityRepository->removeAll();
$testEntity1 = new Fixtures\TestEntity();
$testEntity1->setName('Flow');
$testEntityRepository->add($testEntity1);
$testEntity2 = new Fixtures\TestEntity();
$testEntity2->setName('some');
$testEntityRepository->add($testEntity2);
$this->persistenceManager->persistAll();
$query = new Query(Fixtures\TestEntity::class);
$query->matching($query->equals('name', 'Flow'));
$serializedQuery = serialize($query);
$unserializedQuery = unserialize($serializedQuery);
$this->assertEquals(1, $unserializedQuery->execute()->count());
$this->assertEquals([$testEntity1], $unserializedQuery->execute()->toArray());
}