 			   
 			   selectedNode.isSelected = true;
 
+               var selectedNodeOrDirectAncestorWasRemoved:Boolean;
                 //3. Perform operation
                 if (operation == OP_ADD)
-                    testAddition(_operationCursor);
+                    selectedNodeOrDirectAncestorWasRemoved = testAddition(_operationCursor);
                 else if (operation == OP_REMOVE)
-                    testRemoval(_operationCursor);
+                    selectedNodeOrDirectAncestorWasRemoved = testRemoval(_operationCursor, selectedNode);
+                else if(operation == OP_SET)
+                    selectedNodeOrDirectAncestorWasRemoved = testReplacement(_operationCursor, selectedNode);
 
                 //THEN 1
                 assertTrue(_noErrorsThrown);
 
-				
-				
+				if(selectedNodeOrDirectAncestorWasRemoved)
+                    return; //it means that _sut.current is now (correctly) null
+
                 //4. Create mirror HierarchicalCollectionView from the changed root, as the source of truth
                 _mirrorCursor = _utils.navigateToItem(_currentHierarchy.createCursor() as HierarchicalCollectionViewCursor, selectedNode);
 

			//remove the item
	        var parentOfItemToRemove:DataNode = _currentHierarchy.getParentItem(itemToDelete) as DataNode;
	        var collectionToChange:ArrayCollection = parentOfItemToRemove ? parentOfItemToRemove.children : _utils.getRoot(_currentHierarchy) as ArrayCollection;
			//trace("REM: sel=" + selectedNode + "; before=" + itemToDelete);
			_operationPerformedInLastStep = true;
	        collectionToChange.removeItem(itemToDelete);
	    }


        /**
         * @return true when the where parameter designates an item on the root collection (last ancestor of modified node)
         */
        private function testAddition(where:HierarchicalCollectionViewCursor):void
        {
            var itemBeforeWhichWereAdding:DataNode = where.current as DataNode;
            assertNotNull(itemBeforeWhichWereAdding);

			_operationCursor = _currentHierarchy.createCursor() as HierarchicalCollectionViewCursor;
			_operationCursor.seek(new CursorBookmark(where));
			var itemToPerformOperationOn:DataNode = _operationCursor.current as DataNode;
            return _utils.nodesHaveCommonAncestor(itemToPerformOperationOn, selectedNode, _currentHierarchy);
		}
	
	    private function testRemoval(where:HierarchicalCollectionViewCursor, selectedNode:DataNode):Boolean
	    {
	        var itemToDelete:DataNode = where.current as DataNode;
	        assertNotNull(itemToDelete);

            var currentWillBeNulled:Boolean = itemToDelete == selectedNode || _utils.isAncestor(itemToDelete, selectedNode, _currentHierarchy);

	        //mark the next item, so we know which item disappeared
			where.moveNext();
	        var nextItem:DataNode = where.current as DataNode;
