added an isRoot property to ICNode. The original though was that a node is a root if it’s parent is nil, but this could lead to a situation that the root node would become a child of another node. Adding isRoot property to avoid this.
In addChild series methods, check if the given node isRoot property instead of checking it’s parent because if you detach a node, its parent would be nil which in later addChild method would be mistakenly treated as root.
change throw statement to return NO. move Unit Test helper to separate file