public void FindTypeNodeInHierarchy() { ConfigurationApplicationFile applicationData = ConfigurationApplicationFile.FromCurrentAppDomain(); ConfigurationApplicationNode applicationNode = new ConfigurationApplicationNode(applicationData); IConfigurationUIHierarchy hierarchy = new ConfigurationUIHierarchy(applicationNode, ServiceBuilder.Build()); MyConfigNode configNode = new MyConfigNode("MyBlock"); applicationNode.AddNode(configNode); ConfigurationNode node = (ConfigurationNode)hierarchy.FindNodeByType(typeof(MyConfigNode)); Assert.IsNotNull(node); Assert.AreSame(configNode, node); }