public function hiddenNodeGetsNewUriSegmentOnMoveIfUriAlreadyExists()
{
$contextProperties = array_merge($this->node->getContext()->getProperties(), array('invisibleContentShown' => true));
$context = $this->contextFactory->create($contextProperties);
$homeNode = $context->getNode($this->nodeContextPath);
$historyNode = $homeNode->getNode('about-us/history');
// History node will be moved inside products and gets an uriPathSegment that exists there already.
$historyNode->setProperty('uriPathSegment', 'neos');
$historyNode->setHidden(true);
$this->persistenceManager->persistAll();
$historyNode->moveInto($homeNode->getNode('products'));
$uriPathSegment = $historyNode->getProperty('uriPathSegment');
$this->assertEquals('neos-1', $uriPathSegment);
}