public function testDeletedEntitiesCannotBePersistedAfterwards()
{
$this->clearDb();
$user = new User('john');
$this->em->persist($user);
$this->em->flush();
$this->assertGraphExist('(u:User {login:"john"})');
$this->em->remove($user);
$this->em->flush();
$this->assertGraphNotExist('(u:User {login:"john"})');
$this->setExpectedException(LogicException::class);
$this->em->persist($user);
}