public void FindNode_ShouldReturnCorrectNodeRandom(int depth) { // arrange NodeTree <object> root = new NodeTree <object>(Guid.NewGuid(), new { testInt = 108, text = "test" }); root.GenrateTree(depth, root, new { text = "test2" }); NodeTree <object> randomNode = root.SelectRandomNode(root); // act var actual = root.FindNode(root, randomNode.GetNodeID()); // assert Assert.AreEqual(randomNode, actual); }