/**
* Flush the node changes and reset the persistence manager and node data registry
*
* @return void
*/
public function flushNodeChanges()
{
$nodeDataRepository = $this->objectManager->get(NodeDataRepository::class);
$nodeDataRepository->flushNodeRegistry();
$this->persistenceManager->persistAll();
$this->persistenceManager->clearState();
$this->contextFactory->reset();
}