public function setDefaultValueOnlyIfTheCurrentPropertyIsNull()
{
$nodeService = $this->createNodeService();
$mockNode = $this->getMockBuilder(Node::class)->disableOriginalConstructor()->getMock();
$mockNodeType = $this->mockNodeType('Neos.ContentRepository.Testing:Content');
$mockNode->expects($this->once())->method('getNodeType')->will($this->returnValue($mockNodeType));
$mockNode->expects($this->once())->method('getProperty')->with('title')->will($this->returnValue(null));
$mockNode->expects($this->once())->method('setProperty')->with('title', 'hello');
$mockNodeType->expects($this->once())->method('getDefaultValuesForProperties')->will($this->returnValue(array('title' => 'hello')));
$nodeService->setDefaultValues($mockNode);
}