public function testCreateLocation()
{
$handler = $this->getLocationHandler();
$createStruct = new CreateStruct();
$createStruct->parentId = 77;
$this->locationGateway->expects($this->once())->method('getBasicNodeData')->with(77)->will($this->returnValue($parentInfo = array('node_id' => 77, 'path_string' => '/1/2/77/')));
$this->locationGateway->expects($this->once())->method('create')->with($createStruct, $parentInfo)->will($this->returnValue($createStruct));
$this->locationGateway->expects($this->once())->method('createNodeAssignment')->with($createStruct, 77, 2);
$handler->create($createStruct);
}